Skip to content

fix: reject duplicate content-lengths that differ - #967

Merged
seanmonstar merged 1 commit into
masterfrom
sean/ztxznwkltpwx
Oct 5, 2026
Merged

seanmonstar merged 1 commit into
masterfrom
sean/ztxznwkltpwx

Conversation

@seanmonstar

Copy link
Copy Markdown
Member

h2 would previously parse the first content-length header and make sure the DATA frames matched up. However, someone can send multiple content-length headers that differ. Only the first one was considered internally.

Now, if there are multiple content-length headers that do not agree, the message is rejected with a RST_STREAM.

@seanmonstar
seanmonstar merged commit d96d347 into master Oct 5, 2026
18 of 20 checks passed
@seanmonstar
seanmonstar deleted the sean/ztxznwkltpwx branch October 5, 2026 21:53
zR-JB pushed a commit to zR-JB/h2 that referenced this pull request Oct 6, 2026
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.

1 participant