]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: mux-h2: Don't forget to set the CS_FL_EOS flag with htx.
authorOlivier Houchard <ohouchard@haproxy.com>
Mon, 10 Dec 2018 15:09:53 +0000 (16:09 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 10 Dec 2018 19:53:31 +0000 (20:53 +0100)
When running with HTX, if we got an empty answer, don't forget to set
CS_FL_EOS, or the stream will never be destroyed.

src/mux_h2.c

index c83230a3560e67aa2a5326b310f3d52dc92801b6..f16da22c849a5d69dde461da0406ea879c1d744a 100644 (file)
@@ -4488,8 +4488,11 @@ static size_t h2_rcv_buf(struct conn_stream *cs, struct buffer *buf, size_t coun
        if (h2c->proxy->options2 & PR_O2_USE_HTX) {
                /* in HTX mode we ignore the count argument */
                h2s_htx = htx_from_buf(&h2s->rxbuf);
-               if (htx_is_empty(h2s_htx))
+               if (htx_is_empty(h2s_htx)) {
+                       if (cs->flags & CS_FL_REOS)
+                               cs->flags |= CS_FL_EOS;
                        goto end;
+               }
 
                buf_htx = htx_from_buf(buf);
                count = htx_free_space(buf_htx);