]> git.kaiwu.me - haproxy.git/commit
REGTESTS: converter: add a test for the string trimming and parsing converters
authorWilly Tarreau <w@1wt.eu>
Mon, 21 Sep 2026 20:04:11 +0000 (20:04 +0000)
committerWilly Tarreau <w@1wt.eu>
Wed, 30 Sep 2026 14:26:01 +0000 (16:26 +0200)
commitf290af32f1ec15c3a79ac07ade9d2a7b85fd542f
tree3346476894d0c9edcf4782751c1611e0644a891c
parent90112fea20b599fe8453f1516995a3745a1d0a92
REGTESTS: converter: add a test for the string trimming and parsing converters

The ltrim, rtrim, cut_crlf, base2, port_only and language converters had
no coverage at all, and host_only was only used incidentally by other
tests. They are all checked here, including the corner cases of a string
entirely made of trimmed characters, of a host value without a port, of
an IPv6 host, and of an accept-language header matching nothing with and
without a default value. The "q=" test is also improved to test "q=0".

The input of cut_crlf comes from an URL-encoded query string parameter
since a header field may carry neither a CR nor a LF.
reg-tests/converter/strings.vtc [new file with mode: 0644]