Skip to content

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

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

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

Conversation

@HueCodes
Copy link
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
Copy link
Contributor

pborzenkov commented Jan 13, 2026

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
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!

Copy link
Member

@seanmonstar seanmonstar left a comment

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
Copy link
Contributor Author

HueCodes commented Feb 4, 2026

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

Copy link
Member

@seanmonstar seanmonstar left a comment

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