From 02bac85bee664976f6dcecc424864e9fb99975be Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Thu, 22 Aug 2019 18:34:25 +0200 Subject: [PATCH] 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. --- src/mux_h1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- 2.47.3