From: Christopher Faulet Date: Mon, 26 Jul 2021 08:49:39 +0000 (+0200) Subject: BUG/MINOR: mux-h1: Be sure to swap H1C to splice mode when rcv_pipe() is called X-Git-Tag: v2.5-dev3~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf30756f0c92084be7783f7865ad2d5dcbf80e70;p=thirdparty%2Fhaproxy.git BUG/MINOR: mux-h1: Be sure to swap H1C to splice mode when rcv_pipe() is called The splicing does not work anymore because the H1 connection is not swap to splice mode when rcv_pipe() callback function is called. It is important to set H1C_F_WANT_SPLICE flag to inhibit data receipt via the buffer API. Otherwise, because there are always data in the buffer, it is not possible to use the kernel splicing. This bug was introduced by the commit 2b861bf72 ("MINOR: mux-h1: clean up conditions to enabled and disabled splicing"). The patch must be backported to 2.4. --- diff --git a/src/mux_h1.c b/src/mux_h1.c index bed2e03fab..29ac930b06 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -3432,6 +3432,7 @@ static int h1_rcv_pipe(struct conn_stream *cs, struct pipe *pipe, unsigned int c goto end; } + h1c->flags |= H1C_F_WANT_SPLICE; if (h1s_data_pending(h1s)) { TRACE_STATE("flush input buffer before splicing", H1_EV_STRM_RECV, cs->conn, h1s); goto end;