diff options
author | Christopher Faulet <cfaulet@haproxy.com> | 2023-02-28 17:56:54 +0100 |
---|---|---|
committer | Christopher Faulet <cfaulet@haproxy.com> | 2023-02-28 18:36:46 +0100 |
commit | fb5fff19fee40c660f9839f3bb0b40f33d4899e7 (patch) | |
tree | a85fa0fe4a24ffcf78cffd31724a469d93e1a4f0 | |
parent | 5e1b0e7bf86a300def07388df0ea7f4b3f9e68b9 (diff) | |
download | haproxy-fb5fff19fee40c660f9839f3bb0b40f33d4899e7.tar.gz |
BUG/MINOR: mux-h1: Don't report an error on an early response close
If the response is closed before any data was received, we must not report
an error to the SE descriptor. It is important to be able to retry on an
empty response.
This patch should fix the issue #2061. It must be backported to 2.7.
-rw-r--r-- | src/mux_h1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mux_h1.c b/src/mux_h1.c index 455f62384..7517d92f9 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -1912,7 +1912,7 @@ static size_t h1_process_demux(struct h1c *h1c, struct buffer *buf, size_t count se_fl_set(h1s->sd, SE_FL_EOI); TRACE_STATE("report EOI to SE", H1_EV_RX_DATA, h1c->conn, h1s); } - else if (h1m->state < H1_MSG_DONE) { + else if (h1m->state < H1_MSG_DONE && (h1m->state != H1_MSG_RPBEFORE || b_data(&h1c->ibuf))) { se_fl_set(h1s->sd, SE_FL_ERROR); TRACE_ERROR("message aborted, set error on SC", H1_EV_RX_DATA|H1_EV_H1S_ERR, h1c->conn, h1s); } |