]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: h1: Always try to receive more in h1_rcv_buf().
authorOlivier Houchard <ohouchard@haproxy.com>
Thu, 22 Aug 2019 16:34:25 +0000 (18:34 +0200)
committerOlivier Houchard <cognet@ci0.org>
Thu, 22 Aug 2019 16:35:42 +0000 (18:35 +0200)
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

index b8beaef24becf142e950764811c5f7e6f83d518d..86c6076dcd522df622ec35a7f6d93258c51c8fb7 100644 (file)
@@ -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))