]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-h1: Don't set CS_FL_EOS on a read0 when receiving data to pipe
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 15 Nov 2019 08:41:32 +0000 (09:41 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 15 Nov 2019 13:24:06 +0000 (14:24 +0100)
This is mandatory to process input one more time to add the EOM in the HTX
message and to set CS_FL_EOI on the conn-stream. Otherwise, in the stream, a
SHUTR will be reported on the corresponding channel without the EOI. It may be
erroneously interpreted as an abort.

This patch must be backported to 2.0 and 1.9.

src/mux_h1.c

index 4a254ddb92e13b23ac6a8ef7c8b8abd70748c02a..7264bfa7f5aed89548174d5b793d5a976909cd84 100644 (file)
@@ -2699,8 +2699,6 @@ static int h1_rcv_pipe(struct conn_stream *cs, struct pipe *pipe, unsigned int c
        if (conn_xprt_read0_pending(cs->conn)) {
                h1s->flags |= H1S_F_REOS;
                TRACE_STATE("read0 on connection", H1_EV_STRM_RECV, cs->conn, h1s);
-               if (!pipe->data)
-                       cs->flags |= CS_FL_EOS;
        }
 
        TRACE_LEAVE(H1_EV_STRM_RECV, cs->conn, h1s);