BUG/MEDIUM: mux-h1: Properly detect full buffer cases when adding EOM block
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 28 Mar 2022 20:51:52 +0000 (22:51 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 28 Mar 2022 20:51:54 +0000 (22:51 +0200)
Previous commit ("BUG/MEDIUM: mux-h1: Properly detect full buffer cases
during message parsing") fixes an issue about full buffer detection during
the trailers parsing, this one does the same when we try to add the EOM
block.

There is no upstream ID because the bug only affects the 2.3 and 2.2. The
patch must be backported to 2.2.

src/mux_h1.c

index 20c7774..a8821e7 100644 (file)
@@ -1431,6 +1431,10 @@ static size_t h1_process_eom(struct h1s *h1s, struct h1m *h1m, struct htx *htx,
                        TRACE_STATE("parsing error", H1_EV_RX_DATA|H1_EV_RX_EOI|H1_EV_H1S_ERR, h1s->h1c->conn, h1s);
                        h1_capture_bad_message(h1s->h1c, h1s, h1m, buf);
                }
+               else {
+                       TRACE_STATE("RX path congested, waiting for more space", H1_EV_RX_DATA|H1_EV_RX_EOI|H1_EV_H1S_BLK, h1s->h1c->conn, h1s);
+                       h1s->flags |= H1S_F_RX_CONGESTED;
+               }
                goto end;
        }