You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Is there any way to cancel a request in such a way that if the request body was already sent, it will be too late to do so?
If the client returns "context canceled", that should mean that the request did not reach the server?
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:
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: