]> git.kaiwu.me - haproxy.git/commitdiff
REGTESTS: update trailers tests to cover H1's refusal of forbidden names
authorWilly Tarreau <w@1wt.eu>
Wed, 9 Sep 2026 09:46:03 +0000 (11:46 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 11 Sep 2026 08:08:12 +0000 (10:08 +0200)
Let's extend the trailers test to make sure that forbidden trailer names
are now blocked in H1.

reg-tests/http-messaging/http_transfer_encoding.vtc

index 65088037fbb9d379df21038df6001e9ebce0b29c..9ddef01276f4fa2ede695ef08740cfae61ca7eb7 100644 (file)
@@ -339,3 +339,12 @@ client c18 -connect ${h1_fe5_sock} {
     rxresp
     expect resp.status == 400
 } -run
+
+# however, header names affecting routing or framing are rejected.
+client c19 -connect ${h1_fe5_sock} {
+    txreq -method POST -nolen \
+        -hdr "Transfer-Encoding: chunked" \
+        -body "5\r\nhello\r\n0\r\nX-Tlr: value\r\nContent-Length: 5\r\nTransfer-Encoding: chunked\r\nTE: trailers\r\nHost: foo\r\nConnection: close\r\n\r\n"
+    rxresp
+    expect resp.status == 400
+} -run