From 0c22fa7d6f68a055f259b6735005cbfd9960922f Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 4 Dec 2018 15:21:35 +0100 Subject: [PATCH] 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. --- src/mux_h2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mux_h2.c b/src/mux_h2.c index 5150b4e38..c56efc2f8 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))