From: Christopher Faulet Date: Thu, 25 Jun 2020 13:36:45 +0000 (+0200) Subject: BUG/MINOR: http-ana: Set CF_EOI on response channel for generated responses X-Git-Tag: v2.2-dev11~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a9db7c0d76b53d82144915ded6733d84d1756fa;p=thirdparty%2Fhaproxy.git BUG/MINOR: http-ana: Set CF_EOI on response channel for generated responses To be consistent with other processings on the channels, when HAProxy generates a final response, the CF_EOI flag must be set on the response channel. This flag is used to know that a full message was pushed into the channel (HTX messages with an EOM block). It is used in conjunction with other channel's flags in stream-interface functions. Especially when si_cs_send() is called, to know if we must set or not the CO_SFL_MSG_MORE flag. Without CF_EOI, the CO_SFL_MSG_MORE flag is always set and the message forwarding is delayed. This patch may be backported as far as 1.9, for HTX part only. But this part has changed in the 2.2, so it may be a bit tricky. Note it does not fix any known bug on previous versions because the CO_SFL_MSG_MORE flag is ignored by the h1 mux. --- diff --git a/src/http_ana.c b/src/http_ana.c index 7c362933ec..844da4995a 100644 --- a/src/http_ana.c +++ b/src/http_ana.c @@ -4573,6 +4573,7 @@ int http_forward_proxy_resp(struct stream *s, int final) channel_auto_read(res); channel_auto_close(res); channel_shutr_now(res); + res->flags |= CF_EOI; /* The response is terminated, add EOI */ } data = htx->data - co_data(res);