]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: mux-h2: make sure to always report HTX EOM when consumed by headers
authorWilly Tarreau <w@1wt.eu>
Tue, 4 Dec 2018 14:21:35 +0000 (15:21 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 4 Dec 2018 17:32:39 +0000 (18:32 +0100)
The way htx_xfer_blks() was used is wrong, if we receive data, we must
report everything we found, not just the headers blocks. This ways causing
the EOM to be postponed and some fast responses (or errors) to be incorrectly
delayed.

No backport is needed.

src/mux_h2.c

index 5150b4e389e6fd5d452a509bcbade957ac31ad73..c56efc2f82549a768d728be48dbb249565561688 100644 (file)
@@ -4505,7 +4505,7 @@ static size_t h2_rcv_buf(struct conn_stream *cs, struct buffer *buf, size_t coun
                buf_htx = htx_from_buf(buf);
                count = htx_free_space(buf_htx);
 
-               htx_ret = htx_xfer_blks(buf_htx, h2s_htx, count, (h2s_htx->sl_off != -1) ? HTX_BLK_EOH : HTX_BLK_EOM);
+               htx_ret = htx_xfer_blks(buf_htx, h2s_htx, count, HTX_BLK_EOM);
 
                buf_htx->extra = h2s_htx->extra;
                if (htx_is_not_empty(buf_htx))