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

Servers SHOULD NOT misuse the CANCELLED state #770

Merged
merged 2 commits into from
Sep 21, 2017
Merged

Conversation

MikeBishop
Copy link
Contributor

Fixes #757. Servers shouldn't cancel / send GOAWAY with a value less than a stream that started getting a response. Clients SHOULD discard responses when servers do this, unless the response was complete. (Blowing up seems kind of pointless when the connection is winding down anyway.)

This really feels like a case of "If it hurts, don't do it." Suggestions on tightening the text appreciated.

@@ -767,14 +767,20 @@ indicated in the GOAWAY frame, those requests were not and will not be
processed. Endpoints SHOULD reset any streams above this ID with the error code
HTTP_REQUEST_CANCELLED. Servers MAY also reset streams below the indicated ID
with HTTP_REQUEST_CANCELLED if the associated requests were not processed.
Servers MUST NOT use the HTTP_REQUEST_CANCELLED status for requests which were
partially or fully processed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clients can detect this by observing that it received part of a response. Do you want to recommend a reaction for clients?

Copy link
Contributor Author

@MikeBishop MikeBishop Sep 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following paragraph discusses what clients do with cancelled requests and this PR adds, "However, if a stream is cancelled after receiving a partial response, the response SHOULD NOT be used and the request cannot be safely retried."

Though rereading it, it might be clearer to place the addition before the existing last sentence.

@MikeBishop MikeBishop merged commit f535ee6 into master Sep 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants