BUG/MINOR: mux-h1: Be sure to set CS_FL_WANT_ROOM when EOM can't be added
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 6 Dec 2019 14:59:05 +0000 (15:59 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 9 Dec 2019 09:43:12 +0000 (10:43 +0100)
commit6f6886e021828a24295271bd83b33a9917d70323
treeee459a22d78a81e922eba431a9d3767b91ff3569
parente77b108cde2c9b47f4e7c6f932310e1a5ac674d7
BUG/MINOR: mux-h1: Be sure to set CS_FL_WANT_ROOM when EOM can't be added

During the message parsing, when the HTX buffer is full and only the HTX EOM
block cannot be added, it is important to notify the conn-stream that some
processing must still be done but it is blocked because there is not enough room
in the buffer. The way to do so is to set the CS_FL_WANT_ROOM flag on the
conn-stream. Otherwise, because all data are received and consumed, the mux is
not called anymore to add this last block, leaving the message unfinished from
the HAProxy point of view. The only way to unblock it is to receive a shutdown
for reads or to hit a timeout.

This patch must be backported to 2.1 and 2.0. The 1.9 does not seem to be
affected.

(cherry picked from commit 7aae858001f99dd4a80e3f533284cda5702d501a)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/mux_h1.c