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

[release/6.0] Respect SETTINGS_MAX_HEADER_LIST_SIZE on HTTP/2 #79997

Merged

Conversation

MihaZupan
Copy link
Member

@MihaZupan MihaZupan commented Dec 27, 2022

Backport of #79281 to release/6.0 (only the HTTP/2 part as HTTP/3 is not supported on .NET 6)

Fixes #78193

/cc @MihaZupan

Customer Impact

Without this change, users of HttpClient may randomly hit exceptions informing them that the server closed the connection. This is difficult to debug as nothing points you at the request headers being the culprit, and impacts reliability as unrelated requests may fail at the same time due to connection multiplexing.

With HTTP/2 the server has the option to advertise the maximum length of headers it is willing to receive.
This change respects that limit and fails offending requests before they make it onto the wire, improving the overall reliability of HttpClient while also providing a useful exception message to the user.

Testing

Added targeted CI tests.
The new behavior was validated with a test app running against Kestrel.

Risk

Low, this change enforces a limit that is specified by the server.
Any request that will fail with the new error was very likely already failing before.

@MihaZupan MihaZupan added this to the 6.0.x milestone Dec 27, 2022
@MihaZupan MihaZupan requested a review from a team December 27, 2022 15:49
@MihaZupan MihaZupan self-assigned this Dec 27, 2022
@ghost
Copy link

ghost commented Dec 27, 2022

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

Issue Details

Backport of #79281 to release/6.0 (only the HTTP/2 part as HTTP/3 is not supported on .NET 6)
Contributes to #78193

/cc @MihaZupan

Customer Impact

TODO

Testing

TODO

Risk

TODO

Author: MihaZupan
Assignees: MihaZupan
Labels:

area-System.Net.Http

Milestone: 6.0.x

Copy link
Member

@wfurt wfurt left a comment

Choose a reason for hiding this comment

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

LGTM

@marek-safar marek-safar added the Servicing-consider Issue for next servicing release review label Jan 2, 2023
@MihaZupan MihaZupan added the tenet-reliability Reliability/stability related issue (stress, load problems, etc.) label Jan 3, 2023
@MihaZupan
Copy link
Member Author

CI failures are #79858 and #79859

@karelz
Copy link
Member

karelz commented Jan 5, 2023

Approved by @SteveMCarroll via email on Thu 2023/1/5 2:32 AM - adding Servicing-approved label.

  • email: "[Servicing-Consider] [6.0.X and 7.0.X] Respect SETTINGS_MAX_HEADER_LIST_SIZE in HttpClient"

@karelz karelz added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Jan 5, 2023
@carlossanlop
Copy link
Member

Approved by Tactics (6.0.14).
Signed off by area owners.
No OOB changes needed - The involved src csproj does not have IsPackable=true set.
CI failures investigated as unrelated.
Ready to merge. :shipit:

@carlossanlop carlossanlop merged commit cb73f5d into dotnet:release/6.0 Jan 5, 2023
@carlossanlop carlossanlop modified the milestones: 6.0.x, 6.0.14 Jan 5, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Feb 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Net.Http Servicing-approved Approved for servicing release tenet-reliability Reliability/stability related issue (stress, load problems, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants