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/2] Don't send RST_STREAM back to server if we got RST_STREAM from it #56830

Open
alnikola opened this issue Aug 4, 2021 · 2 comments
Open

Comments

@alnikola
Copy link
Contributor

alnikola commented Aug 4, 2021

Description

When Http2Connection gets a RST_STREAM from the server, it calls Http2Stream.OnReset which can call Cancel method under some condition. Further, Cancel method calls CancelResponseBody which demands to send a RST_STREAM back to server if there is an unfinished response. Cancel does this by calling SendReset.

This behavior violates RFC which forbids sending a RST_STREAM in response to a RST_STREAM.

To avoid looping, an endpoint MUST NOT send a RST_STREAM in response to a RST_STREAM frame.

https://httpwg.org/specs/rfc7540.html#StreamErrorHandler

After receiving a RST_STREAM on a stream, the receiver MUST NOT send additional frames for that stream, with the exception of PRIORITY.

https://httpwg.org/specs/rfc7540.html#RST_STREAM

Regression?

The same logic exists in .NET 5.0.

@ghost
Copy link

ghost commented Aug 4, 2021

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

When Http2Connection gets a RST_STREAM from the server, it calls Http2Stream.OnReset which can call Cancel method under some condition. Further, Cancel method calls CancelResponseBody which demands to send a RST_STREAM back to server if there is an unfinished response. Cancel does this by calling SendReset.

This behavior violates RFC which forbids sending a RST_STREAM in response to a RST_STREAM.

To avoid looping, an endpoint MUST NOT send a RST_STREAM in response to a RST_STREAM frame.

https://httpwg.org/specs/rfc7540.html#StreamErrorHandler

After receiving a RST_STREAM on a stream, the receiver MUST NOT send additional frames for that stream, with the exception of PRIORITY.

https://httpwg.org/specs/rfc7540.html#RST_STREAM

Regression?

The same logic exists in .NET 5.0.

Author: alnikola
Assignees: -
Labels:

area-System.Net.Http

Milestone: -

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Aug 4, 2021
@ManickaP ManickaP removed the untriaged New issue has not been triaged by the area owner label Aug 5, 2021
@ManickaP ManickaP added this to the 7.0.0 milestone Aug 5, 2021
@karelz karelz modified the milestones: 7.0.0, Future Jul 21, 2022
@karelz
Copy link
Member

karelz commented Jul 21, 2022

Triage: No customer impact so far, moving to Future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants