]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: h1: Allow reception if we have early data
authorOlivier Houchard <ohouchard@haproxy.com>
Tue, 9 Sep 2025 15:32:18 +0000 (17:32 +0200)
committerOlivier Houchard <cognet@ci0.org>
Tue, 9 Sep 2025 17:01:24 +0000 (19:01 +0200)
In h1_recv_allowed(), do not forbid the reception if we are yet to
complete the connection, if we have received early data on it. That way,
we can deal with them right away, instead of waiting for the handshake
to be done.

This should be backported up to 2.8.

src/mux_h1.c

index defcada213764958bec3c9e26bf269caae2e39f6..d68582a9726cb14340af33652d46d15e866e42bf 100644 (file)
@@ -527,7 +527,8 @@ static inline int h1_recv_allowed(const struct h1c *h1c)
                return 0;
        }
 
-       if (h1c->conn->flags & (CO_FL_WAIT_L4_CONN|CO_FL_WAIT_L6_CONN)) {
+       if (h1c->conn->flags & (CO_FL_WAIT_L4_CONN|CO_FL_WAIT_L6_CONN) &&
+           !(h1c->conn->flags & CO_FL_EARLY_DATA)) {
                TRACE_DEVEL("recv not allowed because of (waitl4|waitl6) on connection", H1_EV_H1C_RECV|H1_EV_H1C_BLK, h1c->conn);
                return 0;
        }