]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: h2: properly report a stream error on RST_STREAM
authorWilly Tarreau <w@1wt.eu>
Fri, 15 Dec 2017 10:56:29 +0000 (11:56 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 20 Dec 2017 13:38:19 +0000 (14:38 +0100)
We want to report such an error since H2 allows to differenciate
between an end of stream and an abort.

To be backported to 1.8.

src/mux_h2.c

index 7f5806493cdc802491b4ddfd2d17acc5f6887898..838ce952db01d2d1849d06e2ec0caae5a1b5036f 100644 (file)
@@ -1535,7 +1535,7 @@ static int h2c_handle_rst_stream(struct h2c *h2c, struct h2s *h2s)
        h2c_stream_close(h2c, h2s);
 
        if (h2s->cs) {
-               h2s->cs->flags |= CS_FL_EOS;
+               h2s->cs->flags |= CS_FL_EOS | CS_FL_ERROR;
                /* recv is used to force to detect CS_FL_EOS that wake()
                 * doesn't handle in the stream-int code.
                 */