]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-h2: Use the dummy error when decoding headers for a closed stream
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 26 Sep 2019 14:19:13 +0000 (16:19 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 26 Sep 2019 14:51:02 +0000 (16:51 +0200)
Since the commit 6884aa3e ("BUG/MAJOR: mux-h2: Handle HEADERS frames received
after a RST_STREAM frame"), HEADERS frames received for an unknown or already
closed stream are decoded. Once decoded, an error is reported for the
stream. But because it is a dummy stream (h2_closed_stream), its state cannot be
changed. So instead, we must return the dummy error stream (h2_error_stream).

This patch must be backported to 2.0 and 1.9.

src/mux_h2.c

index ef046203a5d98dfcac6d7896fda19cdb52b233f7..b59c7fa63fa9a50661097213a91034729798780a 100644 (file)
@@ -2518,7 +2518,7 @@ static struct h2s *h2c_bck_handle_headers(struct h2c *h2c, struct h2s *h2s)
                 * the data and send another RST.
                 */
                error = h2c_decode_headers(h2c, &rxbuf, &flags, &body_len);
-               h2s_error(h2s, H2_ERR_STREAM_CLOSED);
+               h2s = (struct h2s*)h2_error_stream;
                h2c->st0 = H2_CS_FRAME_E;
                goto send_rst;
        }