]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: mux-h1: Don't loop on the headers parsing if the read0 was received
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 10 Dec 2018 14:30:06 +0000 (15:30 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 10 Dec 2018 19:50:59 +0000 (20:50 +0100)
commitf6ce9d61f98f9c59d18711295836cf17b506a344
tree2538c7481b29392f63afda5077a53789a94597c5
parentcb55f485da126648dcd7ce664bf4a3eebd41d27f
BUG/MEDIUM: mux-h1: Don't loop on the headers parsing if the read0 was received

If a server sends part of headers and then close its connection, the mux H1
reamins blocked in an infinite loop trying to read more data to finish the
parsing of the message. The flag CS_FL_REOS is set on the conn_stream. But
because there are some data in the input buffer, CS_FL_EOS is never set.

To fix the bug, in h1_process_input, when CS_FL_REOS is set on the conn_stream,
we also set CS_FL_EOS if the input buffer is empty OR if the channel's buffer is
empty.
src/mux_h1.c