]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: mux-h1: don't stall when draining more than a buffer of data
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 7 Oct 2026 09:25:10 +0000 (11:25 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 16 Oct 2026 17:10:27 +0000 (19:10 +0200)
commitf3aa948606e188a3b72dd0f1407fa91397aba2cf
tree86e02de7b41059511523e1ff261a892bf738a268
parent990ae4d6addbee27369f2feb788e84695f2c6879
BUG/MEDIUM: mux-h1: don't stall when draining more than a buffer of data

When the H1 connection is in DRAINING state, h1_process() parses the input
data using a stream rxbuf, which limits the amount of data consumed per call
to a buffer minus the reserve. But the input buffer may contain more data
than that. If no more data are received, nothing calls h1_process() again:
the connection only subscribes for reads. The remaining data, the end of the
request payload and possibly the next pipelined request, are then left
unprocessed until the client timeout strikes, which kills the connection and
the pipelined request is lost.

Now, when data are still pending in the input buffer after a parsing pass in
DRAINING state, the parsing is retried.

This was introduced by commit 077906da1 ("MAJOR: mux-h1: Drain requests on
client side before shut a stream down") in 3.0. It must be backported as far
as 3.0.
src/mux_h1.c