]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: mux-h1: Be sure to have a conn_stream to set CS_FL_REOS in h1_recv
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 7 Dec 2018 08:42:49 +0000 (09:42 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 7 Dec 2018 10:43:19 +0000 (11:43 +0100)
In the commit 6a2d33481 ("BUG/MEDIUM: h1: Set CS_FL_REOS if we had a read0."),
We set the flag CS_FL_REOS on the conn_stream when a read0 is detected. But we
must be sure to have a conn_stream first.

src/mux_h1.c

index c2d00303ef5752ab8ddba311396246c5504b53b0..4b0dab3598165b5d5b66bc1adffbe2a22c4f29a3 100644 (file)
@@ -1587,7 +1587,7 @@ static int h1_recv(struct h1c *h1c)
                h1s->recv_wait = NULL;
 
        }
-       if (conn_xprt_read0_pending(conn))
+       if (conn_xprt_read0_pending(conn) && h1s && h1s->cs)
                h1s->cs->flags |= CS_FL_REOS;
        if (!b_data(&h1c->ibuf))
                h1_release_buf(h1c, &h1c->ibuf);