HTTP/3 Testing with curl¶
For building curl with HTTP/3, see the official curl HTTP/3 documentation.
Verify HTTP/3 Support¶
Testing Commands¶
HTTP/3 GET¶
Expected response:
Verbose Handshake¶
Using HTTP/3 confirms a successful QUIC handshake.
Force HTTP/1.1 (TCP)¶
Force HTTP/2 (TCP)¶
HTTP/3 Only (Fail if No QUIC)¶
Unlike --http3, this does not fall back to HTTP/2 or HTTP/1.1. If the QUIC handshake fails, curl exits with an error.
Download a File¶
POST Data¶
PUT a File¶
Alt-Svc Header¶
mod_http3 injects Alt-Svc automatically when H3AltSvc is enabled, which is the default. Use mod_headers only to override that advertisement:
Verify over HTTP/2 (TCP side):
Built-in QUIC Client¶
The repo includes a native QUIC client (build/bin/quic_client_test) that connects to the standalone server (build/bin/server), not Apache httpd.
bash scripts/mkcert.sh keys
./build/bin/server 4433 keys/server.crt keys/server.key &
./build/bin/quic_client_test localhost 4433 keys/server.crt
Expected: Status 200, All streams complete.
Multiple concurrent streams:
Common Failures¶
| Symptom | Likely Cause | Fix |
|---|---|---|
curl: option --http3: is unknown |
curl built without QUIC | Build curl with HTTP/3 support |
Response shows HTTP/1.1 or HTTP/2 |
UDP port blocked or --http3 missing |
Check ss -ulnp \| grep <port> |
curl: (35) SSL connect error |
Certificate not trusted | Add --cacert <cert> or -k |
curl: (28) timed out |
UDP port blocked | Open it: ufw allow <port>/udp |
curl: (56) QUIC handshake failed |
OpenSSL version mismatch | Both sides need >= 3.5.0 |