From 9e3dc8305bb96a3a745caf4111f6849bce45a914 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Wed, 22 Jul 2020 16:28:44 +0200 Subject: [PATCH] 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. --- src/stream_interface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stream_interface.c b/src/stream_interface.c index 314e62801..2c8f11378 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;