From: Willy Tarreau Date: Tue, 5 Mar 2019 09:51:11 +0000 (+0100) Subject: MINOR: mux-h2: always pass HTX_FL_PARSING_ERROR between h2s and buf on RX X-Git-Tag: v2.0-dev2~127 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7196dd6071bc38e6dada98bb00426dd54ca13ba3;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/mux_h2.c b/src/mux_h2.c index b641d22263..fe4d0928e4 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);