From: Andrea Cocito Date: Tue, 23 Jun 2026 09:44:39 +0000 (+0200) Subject: REGTESTS: quic: test H3 request without content-length X-Git-Tag: v3.5-dev1~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c9431c5d4cf8cef472f01a42a6b743126509f2f;p=thirdparty%2Fhaproxy.git REGTESTS: quic: test H3 request without content-length Add a QUIC regression test for an HTTP/3 request body without Content-Length forwarded to an HTTP/1 backend. The client side sends a chunked HTTP/1 request to a first HAProxy instance, which forwards it to a second HAProxy instance over QUIC/H3. The second instance then forwards it to a plain HTTP/1 server. This exercises the H3 frontend to H1 backend path with an unknown request body length. --- diff --git a/reg-tests/quic/h3_unknown_length_req.vtc b/reg-tests/quic/h3_unknown_length_req.vtc new file mode 100644 index 000000000..314fd8c3e --- /dev/null +++ b/reg-tests/quic/h3_unknown_length_req.vtc @@ -0,0 +1,60 @@ +varnishtest "HTTP/3 request body without content-length to H1 backend" + +feature ignore_unknown_macro + +# QUIC backend are not supported with USE_QUIC_OPENSSL_COMPAT +feature cmd "$HAPROXY_PROGRAM -cc 'feature(QUIC) && !feature(QUIC_OPENSSL_COMPAT) && !feature(OPENSSL_WOLFSSL)'" + +server s1 { + rxreq + expect req.method == "POST" + expect req.bodylen == 50000 + txresp +} -start + +haproxy ha_h3srv -conf { + global + .if feature(THREAD) + thread-groups 1 + .endif + + defaults + mode http + timeout connect "${HAPROXY_TEST_TIMEOUT-5s}" + timeout client "${HAPROXY_TEST_TIMEOUT-5s}" + timeout server "${HAPROXY_TEST_TIMEOUT-5s}" + + listen h3_fe + bind "quic+fd@${fe_quic}" ssl crt ${testdir}/certs/common.pem + server srv ${s1_addr}:${s1_port} +} -start + +haproxy ha_h3cli -conf { + global + expose-experimental-directives + .if feature(THREAD) + thread-groups 1 + .endif + + defaults + mode http + timeout connect "${HAPROXY_TEST_TIMEOUT-5s}" + timeout client "${HAPROXY_TEST_TIMEOUT-5s}" + timeout server "${HAPROXY_TEST_TIMEOUT-5s}" + + frontend fe + bind "fd@${fe}" + default_backend be_h3 + + backend be_h3 + server h3 quic4@${ha_h3srv_fe_quic_addr}:${ha_h3srv_fe_quic_port} ssl verify none +} -start + +client c1 -connect ${ha_h3cli_fe_sock} { + txreq -method POST -hdr "Transfer-Encoding: chunked" + chunkedlen 25000 + chunkedlen 25000 + chunkedlen 0 + rxresp + expect resp.status == 200 +} -run