From: Christopher Faulet Date: Thu, 25 Jun 2020 14:11:20 +0000 (+0200) Subject: BUG/MINOR: stream-int: Don't wait to send truncated HTTP messages X-Git-Tag: v2.2-dev11~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=42b77b0ba64cd2f8b1b90b4ca4ac764c1de9f58c;p=thirdparty%2Fhaproxy.git BUG/MINOR: stream-int: Don't wait to send truncated HTTP messages In HTX, since the commit 8945bb6c0 ("BUG/MEDIUM: stream-int: fix loss of CO_SFL_MSG_MORE flag in forwarding"), the CO_SFL_MSG_MORE flag is set on the transport layer if the end of the HTTP message is not reached, to delay the data forwarding. To do so, the CF_EOI flag is tested and must not be set on the output channel. But the CO_SFL_MSG_MORE flag is also added if the message was truncated. Only CF_SHUTR is set if this case. So the forwarding may be delayed to wait more data that will never come. So, in HTX, the CO_SFL_MSG_MORE flag must not be set if the message is finished (full or truncated). No backport is needed. --- diff --git a/src/stream_interface.c b/src/stream_interface.c index 8b84703406..314e628015 100644 --- a/src/stream_interface.c +++ b/src/stream_interface.c @@ -698,7 +698,7 @@ int si_cs_send(struct conn_stream *cs) if ((!(oc->flags & (CF_NEVER_WAIT|CF_SEND_DONTWAIT)) && ((oc->to_forward && oc->to_forward != CHN_INFINITE_FORWARD) || (oc->flags & CF_EXPECT_MORE) || - (IS_HTX_STRM(si_strm(si)) && !(oc->flags & CF_EOI)))) || + (IS_HTX_STRM(si_strm(si)) && !(oc->flags & (CF_EOI|CF_SHUTR))))) || ((oc->flags & CF_ISRESP) && ((oc->flags & (CF_AUTO_CLOSE|CF_SHUTW_NOW)) == (CF_AUTO_CLOSE|CF_SHUTW_NOW)))) send_flag |= CO_SFL_MSG_MORE;