Skip to content

Track HTTP/3 response header budget per-header like HTTP/2 - #128634

Merged
MihaZupan merged 3 commits into
mainfrom
copilot/implement-todo-response-header-length-limits-again
Jun 4, 2026
Merged

MihaZupan merged 3 commits into
mainfrom
copilot/implement-todo-response-header-length-limits-again

Conversation

Copilot AI commented May 27, 2026 •

Copy link
Copy Markdown
Contributor

Matches our accounting logic with HTTP/2.

Existing SocketsHttpHandler_HttpClientHandler_MaxResponseHeadersLength_Http3 tests exercise this path.

Copilot AI requested review from Copilot and removed request for Copilot May 27, 2026 10:27
Copilot AI linked an issue May 27, 2026 that may be closed by this pull request
Copilot AI requested review from Copilot and removed request for Copilot May 27, 2026 10:40
Copilot AI changed the title [WIP] Implement TODO for response header length limits Track HTTP/3 response header budget per-header like HTTP/2 May 27, 2026
Copilot AI requested a review from MihaZupan May 27, 2026 10:41
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

Copilot AI review requested due to automatic review settings May 27, 2026 11:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR changes how HTTP/3 enforces MaxResponseHeadersLength (advertised via SETTINGS_MAX_HEADER_LIST_SIZE) by tracking the remaining header budget per decoded header entry (name length + value length) rather than charging against the compressed HEADERS frame payload size. This aligns HTTP/3’s behavior with the existing HTTP/2 implementation in Http2Stream.

Changes:

  • Removed the HEADERS frame-payload-length-based budget check/subtraction in ReadHeadersAsync.
  • Enforced the response header budget during QPACK decoding by decrementing _headerBudgetRemaining per header in OnHeader and aborting the QUIC read direction with H3_EXCESSIVE_LOAD when exceeded.

@MihaZupan MihaZupan added this to the 11.0.0 milestone May 27, 2026
@MihaZupan
MihaZupan marked this pull request as ready for review May 27, 2026 11:52
@MihaZupan
MihaZupan requested a review from a team May 27, 2026 12:05
@MihaZupan

Copy link
Copy Markdown
Member

/ba-g iOS dead letter

@MihaZupan
MihaZupan merged commit abb5453 into main Jun 4, 2026
92 of 96 checks passed
@MihaZupan
MihaZupan deleted the copilot/implement-todo-response-header-length-limits-again branch June 4, 2026 10:24
@dotnet-milestone-bot dotnet-milestone-bot Bot modified the milestones: 11.0.0, 11.0-preview6 Jun 5, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement TODO around how we apply response header length limits

5 participants