From: Christopher Faulet Date: Wed, 22 Jul 2020 14:28:44 +0000 (+0200) Subject: BUG/MEDIUM: stream-int: Don't set MSG_MORE flag if no more data are expected X-Git-Tag: v2.3-dev2~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9e3dc8305bb96a3a745caf4111f6849bce45a914;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: stream-int: Don't set MSG_MORE flag if no more data are expected In HTX, if the HTX_FL_EOI message is set on the message, we don't set the CO_SFL_MSG_MORE flag on the connection. This way, the send is not delayed if only the EOM is missing in the HTX message. This patch depends on the commit "MEDIUM: htx: Add a flag on a HTX message when no more data are expected". This patch should partially fix the issue #756. It must be backported to 2.1. For earlier versions, CO_SFL_MSG_MORE is ignored by HTX muxes. --- diff --git a/src/stream_interface.c b/src/stream_interface.c index 314e628015..2c8f11378a 100644 --- a/src/stream_interface.c +++ b/src/stream_interface.c @@ -698,7 +698,8 @@ 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|CF_SHUTR))))) || + (IS_HTX_STRM(si_strm(si)) && + (!(oc->flags & (CF_EOI|CF_SHUTR)) && htx_expect_more(htxbuf(&oc->buf)))))) || ((oc->flags & CF_ISRESP) && ((oc->flags & (CF_AUTO_CLOSE|CF_SHUTW_NOW)) == (CF_AUTO_CLOSE|CF_SHUTW_NOW)))) send_flag |= CO_SFL_MSG_MORE;