x/net/http2/h2c: h2c handler doesn't drain initial request body #43654
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?linux/amd64
go env
OutputWhat did you do?
I am trying to use an http2 sever without TLS using h2c. I am trying to read the request body and return it as a response.
I am trying the example from https://pkg.go.dev/golang.org/x/net/http2/h2c after a slight modification:
What did you expect to see?
I expected to see the word "Hello".
What did you see instead?
The request hanging with a console error "http: response.Write on hijacked connection from main.main.func1 (main.go:21)"
Not sure if I am doing something wrong or if I misunderstood the process.
The text was updated successfully, but these errors were encountered: