From: Olivier Houchard Date: Thu, 13 Jun 2019 15:54:33 +0000 (+0200) Subject: BUG/MEDIUM: h1: Wait for the connection if the handshake didn't complete. X-Git-Tag: v2.0.0~47 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=985234d0cb5cecee086fb3b686048907bc120786;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: h1: Wait for the connection if the handshake didn't complete. In h1_init(), also add the H1C_F_CS_WAIT_CONN flag if the handshake didn't complete, otherwise we may end up letting the upper layer sending data too soon. --- diff --git a/src/mux_h1.c b/src/mux_h1.c index 0de6690227..cbab1c4ce4 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -423,7 +423,7 @@ static int h1_init(struct connection *conn, struct proxy *proxy, struct session t->expire = tick_add(now_ms, h1c->timeout); } - if (!(conn->flags & CO_FL_CONNECTED)) + if (!(conn->flags & CO_FL_CONNECTED) || (conn->flags & CO_FL_HANDSHAKE)) h1c->flags |= H1C_F_CS_WAIT_CONN; /* Always Create a new H1S */