]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: h1: Wait for the connection if the handshake didn't complete.
authorOlivier Houchard <ohouchard@haproxy.com>
Thu, 13 Jun 2019 15:54:33 +0000 (17:54 +0200)
committerOlivier Houchard <cognet@ci0.org>
Thu, 13 Jun 2019 17:14:45 +0000 (19:14 +0200)
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.

src/mux_h1.c

index 0de669022747b6440b7dbd423d5d6789a4a7b09d..cbab1c4ce465439fcce3ffa47694c56cfdd2ee24 100644 (file)
@@ -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 */