BUG/MEDIUM: stream: Stop waiting for more data if SI is blocked on RXBLK_ROOM
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 23 Sep 2021 12:46:32 +0000 (14:46 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 23 Sep 2021 14:18:07 +0000 (16:18 +0200)
commit7833596ff42d5f5ba2e9f639b9698cec16613058
tree205da4708595a76ea575d5f174eeb8b1059614df
parentdf99408e0d4e59cf54666772a4224a8665743fbd
BUG/MEDIUM: stream: Stop waiting for more data if SI is blocked on RXBLK_ROOM

If the stream-interface is waiting for more buffer room to store incoming
data, it is important at the stream level to stop to wait for more data to
continue. Thanks to the previous patch ("BUG/MEDIUM: stream-int: Notify
stream that the mux wants more room to xfer data"), the stream is woken up
when this happens. In this patch, we take care to interrupt the
corresponding tcp-content ruleset or to stop waiting for the HTTP message
payload.

To ease detection of the state, si_rx_blocked_room() helper function has
been added. It returns non-zero if the stream interface's Rx path is blocked
because of lack of room in the input buffer.

This patch is part of a series related to the issue #1362. It should be
backported as ar as 2.0, probably with some adaptations. So be careful
during backports.
include/haproxy/stream_interface.h
src/http_ana.c
src/tcp_rules.c