Skip to content

Conversation

@Ph4ntomas
Copy link

problem: h2_stream validate_header reject valid trailers

cause: for response headers, validate_header ignores the nth_header parameter, and checked the pseudo-header :status, even for response trailers.

fix: only check for :status on the first header.

Signed-off-by: phantomas <phantomas@phantomas.xyz>
problem: h2_stream validate_header reject valid response trailers, while
accepting invalid ones.

cause: validate_header checks that all headers contains the ':status'
pseudo-header, which is disallowed by the RFC.

fix: add an 'expect_trailers' parameter to validate_header. This value
is set to true after a final (i.e. non 1XX) header has validated. When
this flag is set, pseudo-headers are disallowed, and ended_stream must
be set on the next header validation.

Signed-off-by: phantomas <phantomas@phantomas.xyz>
@Ph4ntomas Ph4ntomas force-pushed the 236-response-trailers branch 2 times, most recently from 6d333e1 to e879651 Compare November 9, 2025 22:43
@Ph4ntomas
Copy link
Author

@daurnimator this should address your comment in #236

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