Skip to content
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

Http cancel race with stop sending #1558

Closed
siyengar opened this issue Jul 14, 2018 · 4 comments
Closed

Http cancel race with stop sending #1558

siyengar opened this issue Jul 14, 2018 · 4 comments
Labels
-http design An issue that affects the design of the protocol; resolution requires consensus.

Comments

@siyengar
Copy link

In the section on stop sending we say

Servers MUST NOT abort a response in progress as a result of receiving a solicited RST_STREAM.

However a client may have sent a RST before the server sent stop sending. In addition the client may have also sent a http request canceled error code which indicates that it is not interested the response.

It seems like the MUST seems harsh here and it could be a SHOULD with exceptions

@martinthomson
Copy link
Member

If a client wants the server to stop sending the response, it can use STOP_SENDING. But SHOULD NOT is probably OK here. The server can stop sending if it wants to.

@martinthomson martinthomson added design An issue that affects the design of the protocol; resolution requires consensus. -http labels Jul 14, 2018
@siyengar
Copy link
Author

Ya it could use stop sending but it’s possible that the client just doesn’t care anymore and sends a cancel which races with the servers stop sending

@MikeBishop
Copy link
Contributor

If the client wants to abort the request without finishing it, that would definitely be a RST_STREAM. If the client doesn't care about the response to a request it already sent, that would be STOP_SENDING. I suppose it can be SHOULD, or perhaps clarified to say "a RST_STREAM with the STOPPING error code".

However, in a real implementation, I don't think the server will even notice any RST_STREAM regardless of error code -- the STOP_SENDING from the server was triggered in the first place because the server closed its read stream, and it won't see the RST_STREAM unless it tries to read from that stream further, which would probably be considered invalid anyway. So unless and until something happens to the server's write stream -- which would be a STOP_SENDING from the client -- it will continue merrily sending its response regardless of what the client does to the request.

@MikeBishop
Copy link
Contributor

OBE; #1643 addresses this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-http design An issue that affects the design of the protocol; resolution requires consensus.
Projects
None yet
Development

No branches or pull requests

3 participants