]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: mux-h1: Disable 0-copy forwarding when draining the request
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 3 Apr 2026 13:12:54 +0000 (15:12 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 3 Apr 2026 13:12:55 +0000 (15:12 +0200)
When an early response is sent to the client and the H1 connection is
switched to the draining state, we must take care to disable the 0-copy data
forwarding because the backend side is no longer here. It is an issue
because this prevent any regular receive to be performed.

This patch should fix the issue #3316. It must be backported as far as 3.0.

src/mux_h1.c

index d165b88d6e7a83071b4c8863fdc978a77776d2cb..11aaa345bccebe9dd249d625cde248abc02cbb08 100644 (file)
@@ -4672,6 +4672,7 @@ static void h1_detach(struct sedesc *sd)
 
        if (h1c->state == H1_CS_RUNNING && !(h1c->flags & H1C_F_IS_BACK) && h1s->req.state != H1_MSG_DONE) {
                h1c->state = H1_CS_DRAINING;
+               h1c->flags &= ~H1C_F_WANT_FASTFWD;
                h1c_report_term_evt(h1c, muxc_tevt_type_graceful_shut);
                COUNT_IF(1, "Deferring H1S destroy to drain message");
                TRACE_DEVEL("Deferring H1S destroy to drain message", H1_EV_STRM_END, h1s->h1c->conn, h1s);