]> git.kaiwu.me - haproxy.git/commit
REGTESTS: http-messaging: test the http-hardening checks on HTTP/1 headers
authorWilly Tarreau <w@1wt.eu>
Wed, 4 Nov 2026 17:07:55 +0000 (18:07 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 4 Nov 2026 21:45:33 +0000 (22:45 +0100)
commit10598e5b049b58a22be1c2f2df67a42e52d076b8
treeac54efc11f47403caff19e4665520d4fa29bcb40
parent4662225cfcc16562a1c484be19c88633015618f9
REGTESTS: http-messaging: test the http-hardening checks on HTTP/1 headers

This is an LLM-generated reg-test covering HTTP/1 hardening checks.

Each header-related check gets its own profile, applied to a bind line for
requests and to a server line for responses, and a profile with everything
disabled shows that each offending message is accepted by default. The
frontend replies itself with the method, the header names and the value
of a header it saw, so that deletions are observed after the H1 parser.

Covered: duplicate Host, lower case method, underscore in header name (reject,
delete, and reject having precedence over delete), unregistered header
fields, folding (after the colon, and after a value with SP or HT), CTL and
DEL in values (with HT, SP and obs-text still accepted, and CTL found past
the first words), Content-Length with Transfer-Encoding, and Content-Length
with leading zeroes. Rejected requests must return a 400 and rejected
responses a 502.
reg-tests/http-messaging/http_hardening_h1.vtc [new file with mode: 0644]