]> git.kaiwu.me - haproxy.git/commit
REGTESTS: http-messaging: test the reporting of HTTP hardening results
authorWilly Tarreau <w@1wt.eu>
Tue, 10 Nov 2026 10:55:41 +0000 (11:55 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 12 Nov 2026 17:12:23 +0000 (18:12 +0100)
commitc5c1fa00546028a94d6202260b4df20ccd2cc060
tree9faa6ab6e24483309bc4841c81f7a63108f679d0
parent906488861145950778e214caf8aefb7d31c8197e
REGTESTS: http-messaging: test the reporting of HTTP hardening results

This new test checks fs.hdng.found, fs.hdng.fixed, bs.hdng.found and
bs.hdng.fixed from a log-format, as well as the hdng_rej_name converter.
The same anomalies (underscore in a header name, unregistered header,
CTL in a trailer) are sent:
  - through the "trusted" profile on both sides: everything passes, and
    only "found" reports them;
  - in a request to a "strict" profile which deletes the two headers and
    rejects the trailer: the 400 is logged with the three rules in "fixed"
    and hdng_rej_name only names the reject. The trailers are sent apart so
    that the stream exists when they are rejected;
  - in a response from a server using the "strict" profile: same with a 502
    on the backend side;
  - in an H2 request with only the deleted headers: nothing is named.
reg-tests/http-messaging/http_hardening_report.vtc [new file with mode: 0644]