Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Tratcher
Copy link
Member

Backport of #44668 to release/6.0

Send 431 when HTTP/2&3 headers are too large or many

Harden HTTP/2 & 3 to send back 431 errors rather than aborting the connection.

Description

When HTTP/2 hits a header related limit (total size or count) it aborts the connection because HPACK is stateful and failing to process the rest of the headers in a request could corrupt the connection HPACK state. HTTP/3 copied this model. This causes performance and debuggability issues for applications.

To avoid this we'll allow up to 2x of the limits while processing the headers, but then enforce the hard limits later when we can send a 431.

Contributes to #17861 #33622

Customer Impact

Customers have a hard time debugging an application when it kills the connection without reporting an error to the client. It also affects other parallel requests on the same connection.

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

Small modification to existing behavior.

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

@Tratcher Tratcher added this to the 6.0.x milestone Oct 27, 2022
@Tratcher Tratcher requested a review from halter73 as a code owner October 27, 2022 18:41
@Tratcher Tratcher self-assigned this Oct 27, 2022
@ghost
Copy link

ghost commented Oct 27, 2022

Hi @Tratcher. If this is not a tell-mode PR, please make sure to follow the instructions laid out in the servicing process document.
Otherwise, please add tell-mode label.

@Tratcher Tratcher added the Servicing-consider Shiproom approval is required for the issue label Oct 27, 2022
@ghost
Copy link

ghost commented Oct 27, 2022

Hi @Tratcher. Please make sure you've updated the PR description to use the Shiproom Template. Also, make sure this PR is not marked as a draft and is ready-to-merge.

To learn more about how to prepare a servicing PR click here.

@build-analysis build-analysis bot mentioned this pull request Oct 27, 2022
2 tasks
@adityamandaleeka adityamandaleeka added Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Nov 1, 2022
@ghost
Copy link

ghost commented Nov 1, 2022

Hi @Tratcher. This PR was just approved to be included in the upcoming servicing release. Somebody from the @dotnet/aspnet-build team will get it merged when the branches are open. Until then, please make sure all the CI checks pass and the PR is reviewed.

@leecow leecow modified the milestones: 6.0.x, 6.0.12 Nov 1, 2022
@dougbu dougbu merged commit aa5924b into dotnet:release/6.0 Nov 2, 2022
@Tratcher Tratcher deleted the tratcher/release/6.0/longheaders branch November 2, 2022 16:13
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions Servicing-approved Shiproom has approved the issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants