From 7196dd6071bc38e6dada98bb00426dd54ca13ba3 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 5 Mar 2019 10:51:11 +0100 Subject: [PATCH] MINOR: mux-h2: always pass HTX_FL_PARSING_ERROR between h2s and buf on RX In order to allow the H2 parser to report parsing errors, we must make sure to always pass the HTX_FL_PARSING_ERROR flag from the h2s htx to the conn_stream's htx. --- src/mux_h2.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mux_h2.c b/src/mux_h2.c index b641d2226..fe4d0928e 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -5138,6 +5138,10 @@ static size_t h2_rcv_buf(struct conn_stream *cs, struct buffer *buf, size_t coun } htx_ret = htx_xfer_blks(buf_htx, h2s_htx, count, HTX_BLK_EOM); + + if (h2s_htx->flags & HTX_FL_PARSING_ERROR) + buf_htx->flags |= HTX_FL_PARSING_ERROR; + buf_htx->extra = (h2s_htx->extra ? (h2s_htx->data + h2s_htx->extra) : 0); htx_to_buf(buf_htx, buf); htx_to_buf(h2s_htx, &h2s->rxbuf);