]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux-h1: Set EOI on the conn-stream when EOS is reported in TUNNEL state
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 15 Nov 2019 08:50:22 +0000 (09:50 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 15 Nov 2019 13:24:06 +0000 (14:24 +0100)
It could help to distinguish client/server aborts from legitimate shudowns for
reads.

src/mux_h1.c

index 7264bfa7f5aed89548174d5b793d5a976909cd84..7c5451c7a4ac61ae60b1d866295ac98d57b56736 100644 (file)
@@ -1462,7 +1462,9 @@ static size_t h1_process_input(struct h1c *h1c, struct buffer *buf, size_t count
        if (((h1s->flags & (H1S_F_REOS|H1S_F_APPEND_EOM)) == H1S_F_REOS) &&
            (!h1s_data_pending(h1s) || htx_is_empty(htx))) {
                h1s->cs->flags |= CS_FL_EOS;
-               if (h1m->state > H1_MSG_LAST_LF && h1m->state < H1_MSG_DONE)
+               if (h1m->state == H1_MSG_TUNNEL)
+                       h1s->cs->flags |= CS_FL_EOI;
+               else if (h1m->state > H1_MSG_LAST_LF && h1m->state < H1_MSG_DONE)
                        h1s->cs->flags |= CS_FL_ERROR;
        }