BUG/MEDIUM: mux-h1: Don't set the flag CS_FL_RCV_MORE when nothing was parsed
When we start to parse a new message, if all headers have not been received,
nothing is copied in the channel's buffer. In this situation, we must not set
the flag CS_FL_RCV_MORE on the conn-stream. If we do so, the connection freezes
because there is no data to send that can reenable the reads
diff --git a/src/mux_h1.c b/src/mux_h1.c
index 6c0afad..87b5841 100644
--- a/src/mux_h1.c
+++ b/src/mux_h1.c
@@ -1112,8 +1112,10 @@
tasklet_wakeup(h1c->wait_event.task);
}
- if (b_data(&h1c->ibuf))
- h1s->cs->flags |= CS_FL_RCV_MORE;
+ if (b_data(&h1c->ibuf)) {
+ if (!htx_is_empty(htx))
+ h1s->cs->flags |= CS_FL_RCV_MORE;
+ }
else {
h1_release_buf(h1c, &h1c->ibuf);
h1_sync_messages(h1c);