]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux-h2: always pass HTX_FL_PARSING_ERROR between h2s and buf on RX
authorWilly Tarreau <w@1wt.eu>
Tue, 5 Mar 2019 09:51:11 +0000 (10:51 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 5 Mar 2019 09:56:34 +0000 (10:56 +0100)
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

index b641d22263997f940e55015b01663703aaf91648..fe4d0928e4e85209b774397aadf9ef87f7b9289a 100644 (file)
@@ -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);