]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: mux-h1: Properly detect full buffer cases during message parsing
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 28 Mar 2022 14:19:02 +0000 (16:19 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 28 Mar 2022 14:19:04 +0000 (16:19 +0200)
commit744451c7c412677dadfe626642ea5d980208e0d1
treed2e87a731327faf8bbed30d2a58c7f97c0a71e84
parentd9fc12818e4084f76cfa1f31d20a5c17d83ecb3e
BUG/MEDIUM: mux-h1: Properly detect full buffer cases during message parsing

When the destination buffer is full while there are still data to parse, the
h1s must be marked as congested to be able to restart the parsing
later. This work on headers and data parsing. But on trailers parsing, we
fail to do so when the buffer is full before to parse the trailers. In this
case, we skip the trailers parsing but the h1s is not marked as
congested. This is important to be sure to wake up the mux to restart the
parsing when some room is made in the buffer.

Because of this bug, the message processing may hang till a timeout is
triggered. Note that for 2.3 and 2.2, the EOM processing is buggy too, for
the same reason. It should be fixed too on these versions. On the 2.0, only
trailers parsing is affected.

This patch must be backported as far as 2.0. On 2.3 and 2.2, the EOM parsing
must be fixed too.
src/mux_h1.c