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/7.0] Respect SETTINGS_MAX_HEADER_LIST_SIZE on HTTP/2 and HTTP/3 #79994

Merged
merged 1 commit into from
Jan 5, 2023

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Dec 27, 2022

Backport of #79281 to release/7.0

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 and HTTP/3 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 (both HTTP/2 and HTTP/3).

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.

@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/7.0

/cc @MihaZupan

Customer Impact

Testing

Risk

IMPORTANT: Is this backport for a servicing release? If so and this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.

Author: github-actions[bot]
Assignees: -
Labels:

area-System.Net.Http

Milestone: -

@MihaZupan MihaZupan added this to the 7.0.x milestone Dec 27, 2022
@MihaZupan MihaZupan self-assigned this Dec 27, 2022
@MihaZupan MihaZupan requested a review from a team December 27, 2022 14:16
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

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

Build failure is unrelated: #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 (7.0.3).
Signed off by area owners.
No OOB changes needed - the involved src csproj does not have IsPackable=false.
CI failure unrelated/known/already fixed: #78778
Ready to merge. :shipit:

@carlossanlop carlossanlop merged commit 50b02ab into release/7.0 Jan 5, 2023
@carlossanlop carlossanlop deleted the backport/pr-79281-to-release/7.0 branch January 5, 2023 20:19
@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.

4 participants