]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-h1: Always set the session on frontend h1 stream
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 30 Sep 2020 13:00:13 +0000 (15:00 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 7 Oct 2020 12:07:29 +0000 (14:07 +0200)
The session is always defined for a frontend connection. When a new client
connection is established, the session is set for the first H1 stream. But on
keep-alived connections, it is not set for the followings H1 streams while it is
possible.

This patch is tagged as a bug because it fixes an inconsistency in the H1
streams creation. But it does not fixed a known bug.

This patch must be backported as far as 2.0.

src/mux_h1.c

index 909115967677ea3619b856041fee70b20f0728c2..d4c109f9bc9c2acfe271e7d352c1ce04e8cf7b39 100644 (file)
@@ -571,7 +571,7 @@ static struct h1s *h1s_create(struct h1c *h1c, struct conn_stream *cs, struct se
 
                /* For frontend connections we should always have a session */
                if (!sess)
-                       sess = h1c->conn->owner;
+                       h1s->sess = sess = h1c->conn->owner;
 
                /* Timers for subsequent sessions on the same HTTP 1.x connection
                 * measure from `now`, not from the connection accept time */