Repository navigation
Conversation
This branch has not been deployed
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.
Adds an explicit RFC 8441 client path:
WebSocket::setHttp2(true)orws connect wss://host/path --http2. Each WebSocket owns one TLS/H2 connection and stream; HTTP/1.1 remains the default. This follows the proxy integration coverage in #671.WebSocketTransportconsumes aWebSocketStreambyte stream. HTTP/1.1 usesSocketStream; HTTP/2 usesHttp2Streambacked byHttp2Connection, which owns the real TCP/TLS socket. Neither HTTP/2 class inherits fromSocket. WebSocket framing, compression, callbacks, ping/pong and close handling use the same stream interface in both modes. Existing socket/TLS classes retain descriptor ownership, connection setup and socket I/O.The implementation is self-contained C++11: HPACK decoding (dynamic tables and Huffman), never-indexed request encoding, HTTP/2 framing, Extended CONNECT negotiation, bounded buffering, flow control and cancellation. ALPN uses the existing TLS backends. No HTTP/2 production dependency is added.
Scope: experimental client only,
wss://with ALPNh2and peer Extended CONNECT support. No pooling, multiplexing, cleartext H2, HTTP/2 server, or silent HTTP/1.1 fallback. Seedocs/http2.md.Validation after the stream refactor:
SeparateDefinitionBlocks: Always.CI retains assertion output and Docker exit/OOM diagnostics. Server compliance runs in fresh 64-case batches to limit accumulated Python-runner memory; every selected case/report remains mandatory, with the same overall timeout. Batch coverage tests pass. The
h2-proxyandautobahnlabels request integration and HTTP/1.1 compliance regression checks.The mbedTLS CI failure exposed a shutdown race shared by both transports:
stop()sets the stop flag beforeclose()enters CLOSING, and the worker could exit in that gap without a Close callback. The worker now continues polling/dispatching until CLOSED; the stop flag still prevents reconnection. A deterministic, sleep-free regression test fails on the old code and passes with the fix. The upgrade suite passed 100 consecutive ThreadSanitizer runs after the fix, as did the full 39-test regression suite, ASan, H2 proxy checks and Network.framework peer tests.