]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: mux-h1: Add a BUSY mode to not loop on pipelinned requests
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 10 Dec 2018 10:56:47 +0000 (11:56 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 10 Dec 2018 19:50:19 +0000 (20:50 +0100)
commitcb55f485da126648dcd7ce664bf4a3eebd41d27f
tree6c635c139e0d0b6a4ce966e562cb978e0229cfe3
parentde68b1351f515559ca561e2d49beca3b1fdd163e
BUG/MEDIUM: mux-h1: Add a BUSY mode to not loop on pipelinned requests

When a request is fully processed, no more data are parsed until the response is
totally processed and a new transaction starts. But during this time, the mux is
trying to read more data and subscribes to read. If requests are pipelined, we
start to receive the next requests which will stay in the input buffer, leading
to a loop consuming all the CPU. This loop ends when the transaction ends. To
avoid this loop, the flag H1C_F_IN_BUSY has been added. It is set when the
request is fully parsed and unset when the transaction ends. Once set on H1C, it
blocks the reads. So the mux never tries to receive more data in this state.
src/mux_h1.c