]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: h1: Properly reset h1m flags when headers parsing is restarted
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 1 Dec 2021 17:01:48 +0000 (18:01 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 2 Dec 2021 08:46:29 +0000 (09:46 +0100)
commit02c893332bb22b49dbc96e804ca6018446c40f7c
tree7ecddb16a2d45ec9c1f3f321a68c334914a700ba
parent2ad2b1c94cc7bb88b879fb0895a3bee566fdf053
BUG/MEDIUM: h1: Properly reset h1m flags when headers parsing is restarted

If H1 headers are not fully received at once, the parsing is restarted a
last time when all headers are finally received. When this happens, the h1m
flags are sanitized to remove all value set during parsing.

But some flags where erroneously preserved. Among others, H1_MF_TE_CHUNKED
flag was not removed, what could lead to parsing error.

To fix the bug and make things easy, a mask has been added with all flags
that must be preserved. It will be more stable. This mask is used to
sanitize h1m flags.

This patch should fix the issue #1469. It must be backported to 2.5.
include/haproxy/h1.h
src/h1.c