]> git.kaiwu.me - haproxy.git/commit
MINOR: h1: rearrange the header value parser to better deal with CTL chars
authorWilly Tarreau <w@1wt.eu>
Wed, 4 Nov 2026 07:52:44 +0000 (08:52 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 4 Nov 2026 21:45:33 +0000 (22:45 +0100)
commit4f777a626805123f5356546736c121ab40c68576
tree67f0de5037af4a5de3be7a170ee5bbbcb4fc357e
parent34200a02567a4cf975ed63aabe8f412696218e6f
MINOR: h1: rearrange the header value parser to better deal with CTL chars

The header value parser only made a special case of NUL, CR and LF in
its core loop, which doesn't ease detection of other CTL chars. Let's
first slightly rearrange the loop to make the special case of chars below
0x20 first. The checks were only moved inside a new "if" block but nothing
was changed. Use diff -b to better see.
src/h1.c