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

How should an HQ server respond to RST_STREAM? #1596

Closed
afrind opened this issue Jul 23, 2018 · 4 comments
Closed

How should an HQ server respond to RST_STREAM? #1596

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

Comments

@afrind
Copy link
Contributor

afrind commented Jul 23, 2018

If a client sends a RST_STREAM with code HTTP_REQUEST_CANCELLED, the server also needs to reset its end of the stream. As I read the spec, I'm unsure what error code best suits this purpose.

  1. STOPPING says it is reserved by the transport in response to STOP_SENDING, so that's not it.
  2. HTTP_REQUEST_CANCELLED is allowed S->C, but only if no processing of the request has occurred. What if part of the request has been processed?

A corollary question is, if a server cancels a request with a reset_stream, and does not send a STOP_SENDING, is the client expected to reply with HTTP_REQUEST_CANCELLED, a different error code, or continue sending until told to stop? CANCELLED seems ok here, but I dislike the asymmetry.

@LPardue
Copy link
Member

LPardue commented Jul 23, 2018

Some random thoughts:

  • use HTTP_NO_ERROR
  • Can't you just FIN the stream?
    • Section 3.1 says "Servers MUST NOT abort a response in progress as a result of receiving a solicited RST_STREAM." - which might rule this out...

@afrind
Copy link
Contributor Author

afrind commented Jul 23, 2018

I don't want to FIN a stream in response to a RST. For me, FIN implies successful completion and RST applies some kind of exception. I read section 3.1 to mean that if I shouldn't abort the response if I receive RST_STREAM/STOPPING (eg, I asked for one via STOP_SENDING).

NO_ERROR could be OK, though perhaps something with more semantic meaning would be better. "I'm terminating my half because you terminated your half". STOPPING more closely matches that but is reserved for transport.

@LPardue
Copy link
Member

LPardue commented Jul 23, 2018

I understand your points and don't have a strong preference.

The HTTP mapping has previously been accused of too many, too specific errors. So the question to ask would be, would your implementation do anything different if it received RST_STREAM with different application error codes?

@afrind
Copy link
Contributor Author

afrind commented Jul 23, 2018

Perhaps it would not do anything different - but I think this is a confusing area where more explicit text about the expectations of endpoints would help implementers.

@martinthomson martinthomson added design An issue that affects the design of the protocol; resolution requires consensus. -http labels Jul 31, 2018
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