Skip to content

H2: Add test for header value validation#16737

Merged
normanmaurer merged 1 commit into
netty:4.2from
chrisvest:4.2-h2-header-value-validation
May 4, 2026
Merged

H2: Add test for header value validation#16737
normanmaurer merged 1 commit into
netty:4.2from
chrisvest:4.2-h2-header-value-validation

Conversation

@chrisvest
Copy link
Copy Markdown
Member

Motivation:
We have header value validation for DefaultHttp2Headers, including pseudo headers, though it is opt-in and needs to be enabled explicitly.

However, we don't have an HTTP/2 test that shows it working.

Modification:
Add a test to DefaultHttp2HeadersTest that shows how value validation rejects headers with illegal token characters.

Result:
We have a test that proves H2 header value validation works.

Motivation:
We have header value validation for DefaultHttp2Headers, including pseudo headers, though it is opt-in and needs to be enabled explicitly.

However, we don't have an HTTP/2 test that shows it working.

Modification:
Add a test to DefaultHttp2HeadersTest that shows how value validation rejects headers with illegal token characters.

Result:
We have a test that proves H2 header value validation works.
@chrisvest chrisvest added this to the 4.2.13.Final milestone May 1, 2026
@chrisvest chrisvest requested a review from normanmaurer May 1, 2026 21:59
@chrisvest chrisvest added the needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. label May 1, 2026
@normanmaurer normanmaurer added the needs-cherry-pick-4.1 This PR should be cherry-picked to 4.1 once merged. label May 4, 2026
@normanmaurer normanmaurer merged commit a50db19 into netty:4.2 May 4, 2026
21 checks passed
@netty-project-bot
Copy link
Copy Markdown
Contributor

Auto-port PR for 5.0: #16740

@github-actions github-actions Bot removed the needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. label May 4, 2026
@netty-project-bot
Copy link
Copy Markdown
Contributor

Auto-port PR for 4.1: #16741

@github-actions github-actions Bot removed the needs-cherry-pick-4.1 This PR should be cherry-picked to 4.1 once merged. label May 4, 2026
normanmaurer pushed a commit that referenced this pull request May 4, 2026
Auto-port of #16737 to 5.0
Cherry-picked commit: a50db19

---
Motivation:
We have header value validation for DefaultHttp2Headers, including
pseudo headers, though it is opt-in and needs to be enabled explicitly.

However, we don't have an HTTP/2 test that shows it working.

Modification:
Add a test to DefaultHttp2HeadersTest that shows how value validation
rejects headers with illegal token characters.

Result:
We have a test that proves H2 header value validation works.

Co-authored-by: Chris Vest <[email protected]>
@chrisvest chrisvest deleted the 4.2-h2-header-value-validation branch May 7, 2026 20:02
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.

3 participants