]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-h1: do not skip the error response on bad requests
authorWilly Tarreau <w@1wt.eu>
Wed, 16 Jun 2021 13:06:43 +0000 (15:06 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 16 Jun 2021 13:06:43 +0000 (15:06 +0200)
Since 2.4-dev3 with commit c4bfa59f1 ("MAJOR: mux-h1: Create the client
stream as later as possible"), a request error doesn't result in any
error response if "option http-ignore-probes" is set, there's just a
close. This is caused by an unneeded b_reset() in h1_process_demux()'s
error path, which makes h1_handle_bad_req() believe there was an empty
request. There is no reason for this reset to be there, it must have
been a leftover of an earlier attempt at dealing with the error, let's
drop it.

This should be backported to 2.4.

src/mux_h1.c

index c06cec9797d5432c8a83c5770c4b8820e7e014ea..537f0f999cac8a89256797a1e81a1c464b575223 100644 (file)
@@ -1711,7 +1711,6 @@ static size_t h1_process_demux(struct h1c *h1c, struct buffer *buf, size_t count
        return ret;
 
   err:
-       b_reset(&h1c->ibuf);
        htx_to_buf(htx, buf);
        if (h1s->cs)
                h1s->cs->flags |= CS_FL_EOI;