Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
net/http: http.Client Timeout incompatible with writable bodies #31391
As part of #26937, Transport started returning writable bodies for 101 Switching Protocol responses. This is great, thank you!
However, if you have a non-zero Timeout on your http.Client, you can't use this, because of the following lines from client.go:
This wraps the writable body in a non-writable body.
Go version: 1.12
Although we have some streaming requests, we would like to set a long (eg one hour) timeout on our requests to prevent resource exhaustion. #30876 suggests that we can't even do this manually with contexts.