Implement HTTP/1.1 WebSocket Upgrade to HTTP/2 origins (RFC 8441) - #970
Merged
Conversation
Bridge Upgrade requests on the H1→H2 translation path into extended CONNECT when EnableRfc8441 is on, fall back to a dedicated HTTP/1.1 origin when the setting is absent, and keep the historical 501 when the feature is off. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
Isolate RFC 6455 SHA-1 Accept computation, reduce cognitive complexity, and add unit coverage for the tunnel stream and handshake helper. Co-authored-by: Cursor <cursoragent@cursor.com>
…elTests. Co-authored-by: Cursor <cursoragent@cursor.com>
Add unit and integration tests for tunnel stream edges, ENABLE_CONNECT_PROTOCOL validation, missing keys, origin rejections, and BeforeResponse denial; keep client-facing responses on HTTP/1.1. Co-authored-by: Cursor <cursoragent@cursor.com>
|
justcoding121
added a commit
that referenced
this pull request
Aug 2, 2026
Implement HTTP/1.1 WebSocket Upgrade to HTTP/2 origins (RFC 8441)
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.



Summary
Upgrade: websocket→ HTTP/2 origin via RFC 8441 extended CONNECT on the H1→H2 translation bridge (Http11ToHttp2BridgeHandler), gated byEnableRfc8441.Http2TunnelStreamso existing WebSocket relay (TcpHelper.SendRaw/WebSocketInterceptRelay) is reused; falls back to a dedicated HTTP/1.1 origin when the h2 origin lacksSETTINGS_ENABLE_CONNECT_PROTOCOL.EnableRfc8441=falsekeeps the historical synthetic501; docs and integration tests cover disabled, tunnel, and fallback paths.Test plan
dotnet build src/Titanium.Web.Proxy.sln/ library build with--warnaserrordotnet testfilterFullyQualifiedName~Rfc8441H11ToH2TunnelTests(3/3 passed)dotnetcore.ymlgreen on this PRUpstreamHttpProtocol.Http2+ translation + browser/H1 WebSocket client against an h2 origin with and without ENABLE_CONNECT_PROTOCOL