From: Willy Tarreau Date: Tue, 4 Dec 2018 14:21:35 +0000 (+0100) Subject: BUG/MEDIUM: mux-h2: make sure to always report HTX EOM when consumed by headers X-Git-Tag: v1.9-dev10~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0c22fa7d6f68a055f259b6735005cbfd9960922f;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: mux-h2: make sure to always report HTX EOM when consumed by headers 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. --- diff --git a/src/mux_h2.c b/src/mux_h2.c index 5150b4e389..c56efc2f82 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -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))