http: send 400 for HTTP/2 and HTTP/3 headers/trailers with underscores#45111
Draft
Winbobob wants to merge 6 commits into
Draft
http: send 400 for HTTP/2 and HTTP/3 headers/trailers with underscores#45111Winbobob wants to merge 6 commits into
Winbobob wants to merge 6 commits into
Conversation
db4afa4 to
073053d
Compare
When UHV is enabled and headers_with_underscores_action is REJECT_REQUEST, HCM now sends a 400 response for HTTP/2 instead of resetting the stream, matching HTTP/1 behavior. The new behavior is gated on the runtime guard envoy.reloadable_features.http2_h3_send_400_for_underscored_headers (enabled by default). HTTP/3 continues to reset pending follow-up work for the QUIC stream-lifecycle issue tracked in envoyproxy#24735. Partially fixes envoyproxy#24466 and envoyproxy#24735. Signed-off-by: Zhewei Hu <zhewei.hu33@gmail.com>
073053d to
f9e34ba
Compare
added 5 commits
May 18, 2026 08:36
Signed-off-by: Zhewei Hu <zhewehu@microsoft.com>
…r trailer errors Signed-off-by: Zhewei Hu <zhewehu@microsoft.com>
…nderscore path Signed-off-by: Zhewei Hu <zhewehu@microsoft.com>
…details Signed-off-by: Zhewei Hu <zhewehu@microsoft.com>
Signed-off-by: Zhewei Hu <zhewehu@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit Message:
http: send 400 for HTTP/2 and HTTP/3 headers/trailers with underscores when configured to reject
Additional Description:
When the connection is configured with
REJECT_REQUESTforheaders_with_underscores_action, the HTTP/2 and HTTP/3 codecs now send a 400 response instead of resetting the stream. This makes their behavior consistent with HTTP/1.This is a rebased revival of #35393.
Risk Level: Low — gated by the existing
REJECT_REQUESTsetting; only the failure response changes (reset → 400).Testing: Existing unit and integration tests updated; new UHV trailer-underscore acceptance test added.
Docs Changes: Updated
header_validator.protoandconn_manager_impl.hcomments to reflect H/2 + H/3 behavior.Release Notes: Added bug_fix entry in
changelogs/current.yaml.Platform Specific Features: N/A
Fixes #24466
Fixes #24735