net/http: RoundTrip hangs for request with Expect: 100-continue if the server skips continue frame #45834
Labels
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
)?go env
OutputWhat did you do?
The algorithm below is a variation of tunnelling using request&response bodies #13444
What happens:
Expect: 100-continue
header200 OK
(Continue header is not sent by server, because server hasn't read from the request, there is no way to manually trigger Continue frame from the server)What did you expect to see?
The client successfully writes request body and test completes
What did you see instead?
Nothing progresses until ExpectContinueTimeout is triggered (1 minute)
Thoughts
The
bodyWriter
doesn't read request body, because it still waits for frame100 Continue
https://github.com/golang/net/blob/master/http2/transport.go#L2022I feel that successful response can be considered as an alternative to
100 Continue
and be used to start body write.So the fix could be:
https://github.com/golang/net/blob/89ef3d95e781148a0951956029c92a211477f7f9/http2/transport.go#L1159
The text was updated successfully, but these errors were encountered: