net/http: request not really canceled #32685
Closed
Labels
Comments
You will probably get a better and faster answer on a forum. See https://golang.org/wiki/Questions. |
Ok. I will try. I was wondering if it’s a bug... |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Using the code in this snippet: https://play.golang.org/p/oSK66nc3I_S with go1.12 does not have the expected outcome. I have tried my best to find the documentation explaining exactly how request cancelation works all the way from client to server, as well as tried to look at the code, but it was a bit difficult to figure out.
When a request is canceled by the client, and it returns an error that a request was canceled (
context.Canceled
), is it wrong to have the expectation that server did not read the body and processed it? I'd expect a canceled request to mean exactly that. Otherwise what is really canceled here?Lastly, if the above is not correct, then I'd at least expect a way for the server to tell that the request was canceled.
This seems like a bug to me. If a request has completed, the "canceled" error should never be returned.
The text was updated successfully, but these errors were encountered: