Skip to content

HTTP/2: Treat clients MAX_HEADER_LIST_SIZE as advisory#16883

Merged
normanmaurer merged 2 commits into
4.1from
h_max41
Jun 2, 2026
Merged

HTTP/2: Treat clients MAX_HEADER_LIST_SIZE as advisory#16883
normanmaurer merged 2 commits into
4.1from
h_max41

Conversation

@normanmaurer
Copy link
Copy Markdown
Member

Motivation:
SETTINGS_MAX_HEADER_LIST_SIZE is advisory per RFC 9113 §6.5.2. When acting as a server, the remote peer is a client whose advertised value reflects what it is prepared to receive. Honoring arbitrarily small values creates a DoS vector: a client setting this to 1 byte would prevent any valid response from being sent.

Modification:
When running as a server, the DefaultHttp2ConnectionEncoder now ignore the max header list size setting from clients.

Result:
Clients can no longer cheaply induce errors on an HTTP/2 server by advising unreasonably smaller header size limits.

The behavior of ignoring the max header list size matches other H2 implementations, like nghttp2, nginx, and envoy.

Motivation:
SETTINGS_MAX_HEADER_LIST_SIZE is advisory per RFC 9113 §6.5.2. When acting as a server, the remote peer is a client whose advertised value reflects what it is prepared to receive. Honoring arbitrarily small values creates a DoS vector: a client setting this to 1 byte would prevent any valid response from being sent.

Modification:
When running as a server, the `DefaultHttp2ConnectionEncoder` now ignore the max header list size setting from clients.

Result:
Clients can no longer cheaply induce errors on an HTTP/2 server by advising unreasonably smaller header size limits.

The behavior of ignoring the max header list size matches other H2 implementations, like nghttp2, nginx, and envoy.
@chrisvest chrisvest enabled auto-merge (squash) June 1, 2026 18:44
@chrisvest chrisvest added this to the 4.1.135.Final milestone Jun 1, 2026
@normanmaurer normanmaurer disabled auto-merge June 2, 2026 13:25
@normanmaurer normanmaurer merged commit b831454 into 4.1 Jun 2, 2026
18 checks passed
@normanmaurer normanmaurer deleted the h_max41 branch June 2, 2026 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants