]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-h1: Don't report an error on EOS if no message was received
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 8 Mar 2019 14:13:41 +0000 (15:13 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 15 Mar 2019 13:33:02 +0000 (14:33 +0100)
An error is reported if the EOS is detected before the end of the message. But
we must be carefull to not report an error if there is no message at all.

This patch must be backported to 1.9.

src/mux_h1.c

index 59784051ea9fa766e2175f0a36be565ebb02d33e..c09d008f406bc6c6d3de85b30f916d461d92d11c 100644 (file)
@@ -1393,7 +1393,7 @@ static size_t h1_process_input(struct h1c *h1c, struct buffer *buf, int flags)
 
        if ((h1s->cs->flags & CS_FL_REOS) && (!b_data(&h1c->ibuf) || htx_is_empty(htx))) {
                h1s->cs->flags |= CS_FL_EOS;
-               if (h1m->state < H1_MSG_DONE)
+               if (h1m->state > H1_MSG_LAST_LF && h1m->state < H1_MSG_DONE)
                        h1s->cs->flags |= CS_FL_ERROR;
        }