Tests: WebSocket and CONNECT over HTTP/2 and HTTP/3 - #109
Open
liudongmiao wants to merge 2 commits into
Open
Conversation
The h2.t change reflects that CONNECT with ":scheme" and ":path" is now rejected as malformed instead of not allowed.
liudongmiao
force-pushed
the
connect-over-http2-http3
branch
from
August 27, 2026 10:21
ebf5573 to
74b6733
Compare
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.
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.tfollowproxy_websocket.t. They cover the handshake nginx synthesizes for the upstream, the response headers it drops,accept_extended_connect off,:protocolon a request that is not CONNECT, and the SETTINGS advertisement.h2_tunnel.t,h3_tunnel.tfollowtunnel.t, withtunnel.t's authority matrix, minus the HTTP/1.0 case, plus a zero port, a missing authority,:schemeand:path.h2.tis updated because CONNECT carrying:schemeand:pathis 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.tfails 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:
README.mdand/orCHANGELOG.md).