From: Olivier Houchard Date: Thu, 22 Aug 2019 16:34:25 +0000 (+0200) Subject: BUG/MEDIUM: h1: Always try to receive more in h1_rcv_buf(). X-Git-Tag: v2.1-dev2~200 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=02bac85bee664976f6dcecc424864e9fb99975be;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: h1: Always try to receive more in h1_rcv_buf(). In h1_rcv_buf(), wake the h1c tasklet as long as we're not done reading the request/response, and the h1c is not already subscribed for receiving. Now that we no longer subscribe in h1_recv() if we managed to read data, we rely on h1_rcv_buf() calling us again, but h1_process_input() may have returned 0 if we only received part of the request, so we have to wake the tasklet to be sure to get more data again. --- diff --git a/src/mux_h1.c b/src/mux_h1.c index b8beaef24b..86c6076dcd 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -2426,7 +2426,7 @@ static size_t h1_rcv_buf(struct conn_stream *cs, struct buffer *buf, size_t coun if (h1m->state != H1_MSG_TUNNEL || (h1m->state == H1_MSG_DATA && h1m->curr_len)) h1s->flags |= H1S_F_BUF_FLUSH; } - else if (ret > 0 || (h1s->flags & H1S_F_SPLICED_DATA)) { + else { h1s->flags &= ~H1S_F_SPLICED_DATA; if (h1m->state != H1_MSG_DONE && !(h1c->wait_event.events & SUB_RETRY_RECV))