upstream: force h1 for websocket upgrades when allow_connect is false on auto_config clusters#44317
Open
AdamEAnderson wants to merge 5 commits intoenvoyproxy:mainfrom
Open
upstream: force h1 for websocket upgrades when allow_connect is false on auto_config clusters#44317AdamEAnderson wants to merge 5 commits intoenvoyproxy:mainfrom
AdamEAnderson wants to merge 5 commits intoenvoyproxy:mainfrom
Conversation
… on auto_config clusters Signed-off-by: Adam Anderson <6754028+AdamEAnderson@users.noreply.github.com>
Signed-off-by: Adam Anderson <6754028+AdamEAnderson@users.noreply.github.com>
Contributor
Author
|
checks failing due to unrelated test flakes, will merge latest and make this ready for review |
…pn-h1-websocket-upgrade Signed-off-by: Adam Anderson <6754028+AdamEAnderson@users.noreply.github.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: upstream: force h1 for websocket upgrades when allow_connect is false on auto_config clusters
Additional Description:
When a cluster uses http_protocol_options auto_config (for ALPN-based codec selection)
and the upstream supports both h1 and h2, websocket upgrade requests that originated downstream
as h1 upgrades are proxied to the upstream as HTTP/2 connections over extended CONNECT even when the
http2_protocol_options allow_connect flag is disabled.
These upgrades should be proxied as-is to the upstream as h1 websocket upgrade requests
when connect is flagged as supported by the upstream. This matches the docs for
allow_connect:
Allows proxying Websocket and other upgrades over H2 connect.This patch makes h1 websocket upgrades always use the h1 pool with ALPN-based pool selection
when allow_connect is not enabled. Non-ALPN-based clusters, clusters with allow_connect enabled,
non-websocket-upgrade-requests, etc are not changed.
Risk Level: medium: chance of breaking existing users who depend on these off-spec upgrades
Testing: included
Docs Changes: n/a
Release Notes: included
Platform Specific Features: n/a
(claude code assisted with parts of the changes)