Skip to content

fix(http1): use case-insensitive matching for trailer fields#4011

Merged
seanmonstar merged 3 commits into
hyperium:masterfrom
HueCodes:fix-trailer-case-sensitivity
Feb 6, 2026
Merged

fix(http1): use case-insensitive matching for trailer fields#4011
seanmonstar merged 3 commits into
hyperium:masterfrom
HueCodes:fix-trailer-case-sensitivity

Conversation

@HueCodes

Copy link
Copy Markdown
Contributor

Trailer header values were stored as HeaderValue and compared against HeaderName, causing case mismatch. Convert to HeaderName during parsing to normalize case per RFC 9110.

Closes #4010

Trailer header values were stored as HeaderValue and compared against
HeaderName, causing case mismatch. Convert to HeaderName during parsing
to normalize case per RFC 9110.

Closes hyperium#4010
@pborzenkov

pborzenkov commented Jan 13, 2026

Copy link
Copy Markdown
Contributor

Oh, sorry, haven't seen you've already come up with a PR and made my own to address the issue: #4012

Feel free to close mine.

@HueCodes

Copy link
Copy Markdown
Contributor Author

Hey thanks for the reply. I'm happy to close mine and look for a new issue to tackle. Just let me know what works best for you!

@seanmonstar seanmonstar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, I'm happy to merge this one. Could we pull in the integration tests from the other PR? I think that'd make us more robust.

Add tests to verify case-insensitive matching for trailer field names
works correctly with titlecase headers like "Chunky-Trailer".

Co-authored-by: Pavel Borzenkov <pavel@borzenkov.net>
@HueCodes

HueCodes commented Feb 4, 2026

Copy link
Copy Markdown
Contributor Author

Appreciate the review. I added the integration tests from #4012. Thank you @pborzenkov

@seanmonstar seanmonstar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Awesome, thank you!

@seanmonstar seanmonstar merged commit 3b344ca into hyperium:master Feb 6, 2026
22 checks passed
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.

HTTP/1.1 trailers are case-sensitive

3 participants