net/http: Protocol upgrade from HTTP1.1 to h2c(HTTP2) when the request contains payload body, is failing. #41445
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
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: