]> git.kaiwu.me - haproxy.git/commit
REGTESTS: http-messaging: test the http-hardening checks on trailers
authorWilly Tarreau <w@1wt.eu>
Wed, 4 Nov 2026 17:09:18 +0000 (18:09 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 4 Nov 2026 21:45:33 +0000 (22:45 +0100)
commit5a7f7cbc98eaccb50b60b0c367ea766f1f5b1e0e
tree4f78720d7284dd880623acefb87cb9a513981ecd
parent0312f6dcde210a03f9bbf52d38a2c129147cb705
REGTESTS: http-messaging: test the http-hardening checks on trailers

This is an LLM-generated reg-test covering hardening checks on trailers.
These are tricky because we don't have anything beyond TCP mode with
content inspection to check them.

Each trailer-related check gets its own profile, applied to a bind line for
request trailers and to a server line for response trailers, with both
HTTP/1 and HTTP/2 on the receiving side. A profile enabling header checks
verifies that these ones do not affect trailers.

vtest cannot parse HTTP/1 trailers, so the request trailers are forwarded in
HTTP/1 to a TCP frontend of the same instance, which waits for the whole
chunked message, then switches to HTTP and replies with the list of fields
it received. Response trailers are delivered to HTTP/2 clients, and the
response body is waited for so that a rejected trailer results in a 502.

Covered: underscore in trailer name (reject and delete), unregistered
trailer fields, deletion of all trailers, folding, CTL and DEL in values.
reg-tests/http-messaging/http_hardening_trailers.vtc [new file with mode: 0644]