BUG/MINOR: h1: Don't support LF only at the end of chunks
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 26 Jan 2024 15:23:51 +0000 (16:23 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 31 Jan 2024 14:51:27 +0000 (15:51 +0100)
commit787b67ddf1512b0b2c8740c2e4018e86d0797fa6
tree88272c91b95a7f666e611dc7882972e5b7aa9c14
parentd30fbd1e625d6986467be178ad376e75e514cd2e
BUG/MINOR: h1: Don't support LF only at the end of chunks

When the message is chunked, all chunks must ends with a CRLF. However, on
old versions, to support bad client or server implementations, the LF only
was also accepted. Nowadays, it seems useless and can even be considered as
an issue. Just forbid LF only at the end of chunks, it seems reasonnable.

This patch must be backported to 2.9 and probably to all stable versions
because there is no reason to still support LF without CR in this case.

(cherry picked from commit 7b737da8258ebdd84e702a2d65cfd3c423f8e96d)
Signed-off-by: Willy Tarreau <w@1wt.eu>
include/haproxy/h1.h
src/h1_htx.c