From edbbe946d05c29972cc279b9cabfe632993b5f88 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Mon, 19 Apr 2021 19:57:43 +0200 Subject: [PATCH] BUG/MINOR: mux-h1: Release idle server H1 connection if data are received When data are received on an idle H1 connection on server side, we must take care to release the connection. Most of time, it will be a 408-Request-Time-out response. But, in all cases, these data should never be processed as a response to a client. There is no upstream ID because the 2.4 is not affected by this bug. It must be backported as far as 2.0. (cherry picked from commit d29ab4d43e7ec651fa034eb40228c2ec5fe101d9) Signed-off-by: Christopher Faulet (cherry picked from commit 09089272d1c1c06be72142edb8c8af34d64b357f) Signed-off-by: Christopher Faulet --- src/mux_h1.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mux_h1.c b/src/mux_h1.c index 28d6256..b9b1405 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -2223,6 +2223,8 @@ static int h1_process(struct h1c * h1c) if (!h1s_create(h1c, NULL, NULL)) goto release; } + else if (conn_is_back(conn) && (h1c->flags & H1C_F_CS_IDLE) && b_data(&h1c->ibuf)) + goto release; else goto end; h1s = h1c->h1s; -- 1.7.10.4