From 07c7c837a9a909c7381435f87ad67fba6cebd808 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Fri, 3 Jul 2020 15:12:00 +0200 Subject: [PATCH] BUG/MINOR: mux-h1: Disable splicing only if input data was processed In h1_rcv_buf(), the splicing is systematically disabled if it was previously enabled. When it happens, if the splicing is enabled it means the channel's buffer was empty before calling h1_rcv_buf(). Thus, the only reason to disable the splicing at this step is when some input data have just been processed. This patch may be backported to 2.1 and 2.0. (cherry picked from commit 7b7016bf6e69f61074684e9145e1a6784b6a9d03) Signed-off-by: Christopher Faulet --- src/mux_h1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mux_h1.c b/src/mux_h1.c index 513c561..bd1842f 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -2633,7 +2633,7 @@ static size_t h1_rcv_buf(struct conn_stream *cs, struct buffer *buf, size_t coun } } else { - if (h1s->flags & H1S_F_SPLICED_DATA) { + if (ret && h1s->flags & H1S_F_SPLICED_DATA) { h1s->flags &= ~H1S_F_SPLICED_DATA; TRACE_STATE("disable splicing", H1_EV_STRM_RECV, h1c->conn, h1s); } -- 1.7.10.4