New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net/http: Handler read doesn't error on context cancel #20831
Comments
This isn't a net/http issue. The r.Body does fail on context cancel. The problem is that the write to your io.PipeWriter blocks forever. If anything, this bug is that there's no way to create an io.Pipe pair with an associated context. |
I'm going to close this, since there's no demonstrated http bug here. But feel free to file a feature request bug about adding context support to io.Pipe. Let me know if I misunderstood this bug, though, and we can reopen. |
Ah I see thanks
|
This also works (http2), which the client doesn't seem to use without the line
|
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?1.8
What operating system and processor architecture are you using (
go env
)?linux amd64
What did you do?
What did you expect to see?
The io.Copy unblock with an error.
What did you see instead?
io.Copy never unblocks.
The text was updated successfully, but these errors were encountered: