Skip to content

Tests: WebSocket and CONNECT over HTTP/2 and HTTP/3 - #109

Open
liudongmiao wants to merge 2 commits into
nginx:masterfrom
brevent:connect-over-http2-http3
Open

Tests: WebSocket and CONNECT over HTTP/2 and HTTP/3#109
liudongmiao wants to merge 2 commits into
nginx:masterfrom
brevent:connect-over-http2-http3

Conversation

@liudongmiao

@liudongmiao liudongmiao commented Aug 26, 2026

Copy link
Copy Markdown

Proposed changes

Tests for WebSocket over HTTP/2 and HTTP/3 using extended CONNECT, and for plain CONNECT tunnels over HTTP/2 and HTTP/3. Verify changes in PR: nginx/nginx#1683

  • h2_proxy_websocket.t, h3_proxy_websocket.t follow proxy_websocket.t. They cover the handshake nginx synthesizes for the upstream, the response headers it drops, accept_extended_connect off, :protocol on a request that is not CONNECT, and the SETTINGS advertisement.
  • h2_tunnel.t, h3_tunnel.t follow tunnel.t, with tunnel.t's authority matrix, minus the HTTP/1.0 case, plus a zero port, a missing authority, :scheme and :path.
  • h2.t is updated because CONNECT carrying :scheme and :path is now rejected as malformed with 400 instead of 405, and 405 moves to a conforming CONNECT.

Test results

Against the source patch all 268 assertions pass. The wider run over the HTTP/2, HTTP/3, websocket, tunnel and proxy upgrade tests passes as well, 1545 assertions across 75 files.

Against nginx master without the patch the two websocket files skip, as master does not have the directives their configuration uses. h2.t fails 2 assertions and each tunnel file fails 5, so this needs nginx/nginx#1683 first.

The two tunnel files also pass unchanged against nginx/nginx#1277, a different implementation of plain CONNECT over HTTP/2 and HTTP/3, so they are not tied to either one.

Checklist

Before creating a PR, run through this checklist and mark each as complete:

@liudongmiao liudongmiao changed the title Tests: CONNECT and extended CONNECT support for HTTP/2 and HTTP/3 Tests: WebSocket and CONNECT over HTTP/2 and HTTP/3 Aug 26, 2026
The h2.t change reflects that CONNECT with ":scheme" and ":path" is now
rejected as malformed instead of not allowed.
@liudongmiao
liudongmiao force-pushed the connect-over-http2-http3 branch from ebf5573 to 74b6733 Compare August 27, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

1 participant