-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Fixes a bug in Envoy's HTTP/3-to-HTTP/1 proxying when a transfer-enco… #39589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ding header is incorrectly appended Signed-off-by: Ting Pan <[email protected]>
Signed-off-by: Ting Pan <[email protected]>
/retest |
@RyanTheOptimist Hi Ryan, I restarted the pr here, added an integration test, please review again, thank you |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, but one question about the integration test.
// When downstream protocol is HTTP3 and upstream protocol is HTTP1, an OPTIONS | ||
// request with no body will not append transfer-encoding chunked. | ||
TEST_P(DownstreamProtocolIntegrationTest, OptionsWithNoBodyNotChunked) { | ||
// This test is only relevant for H3 downstream to H1 upstream. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this test was added specifically for HTTP/3, I think the logic applies to H2 and H1 as well, right? Does this test pass if we remove the H3 restriction here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They do pass, in that case, do you prefer to make it non-quic-specific test? in that case I'll move it to protocol_integration_test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, good idea!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated, please review again, thank you
Signed-off-by: Ting Pan <[email protected]>
/retest |
/retest |
Signed-off-by: Ting Pan <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Any idea why CI is red?
Signed-off-by: Ting Pan <[email protected]>
thank you Ryan.
trying rerun |
/retest |
@RyanTheOptimist all green now, ready for merge, thank you |
Commit Message: QUIC Stream: Fixes a bug in Envoy's HTTP/3-to-HTTP/1 proxying when a "transfer-encoding" header is incorrectly appended.
Additional Description: Envoy, when proxying via hyperloop to HTTP/1 backend, incorrectly interprets the end of an HTTP/3 HEADERS frame contained in a QUIC STREAM frame with the end_stream/fin bit set to true. This causes the HTTP/1 codec to mistakenly add a "transfer-encoding" header. This CL addresses this by inspecting the data before encoding headers. For requests containing only headers, it now explicitly signals the end of the stream with the "headers-only" indicator, which is the correct way to denote this in HTTP/3 (unlike the "fin" flag). This prevents the incorrect "transfer-encoding" header from being added.
Risk Level: low, guarded by runtime guard
Testing: internally tested with google3 e2e tests
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:] envoy_reloadable_features_quic_signal_headers_only_to_http1_backend
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]