net/http: Protocol upgrade from HTTP1.1 to h2c(HTTP2) when the request contains payload body, is failing. #41445
Labels
Milestone
Comments
cc @fraenkel |
Its broken, but so is h2c. If you attempt to do a POST instead of GET which is more common with data, you get the same error. |
Thank you for the update @fraenkel. Do we have any solution or workaround for this? |
closing as dup of #38064 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When client sends request to upgrade from http1.1 to http2 and the request contains the payload body, the server fails to upgrade to http2. (RFC 7540 section 3.2)
And observed the following error.
2020/09/17 12:11:10 http: response.Write on hijacked connection from fmt.Fprintf (print.go:205)
GO Versions
go version go1.15.2 linux/amd64
Steps to Reproduce
sudo curl -vs -o /dev/null --http2 --request GET --data '{"username":"xyz","password":"xyz"}' http://localhost:8090/hello
Expected behavior:
The HTTP2 upgrade should be successful and the server should send the response back to the client.
Code Snippets
The text was updated successfully, but these errors were encountered: