From: Christopher Faulet Date: Mon, 7 Mar 2022 14:53:57 +0000 (+0100) Subject: BUG/MINOR: cache: Set conn-stream/channel EOI flags at the end of request X-Git-Tag: v2.6-dev3~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbf1e88e87748aef2db25fcdfeb22a4005908d41;p=thirdparty%2Fhaproxy.git BUG/MINOR: cache: Set conn-stream/channel EOI flags at the end of request This bug is the same than for the HTTP client. See "BUG/MINOR: httpclient: Set conn-stream/channel EOI flags at the end of request" for details. Note that because a filter is always attached to the stream when the cache is used, there is no issue because there is no direct forwarding in this case. Thus the stream analyzers are able to see the HTX_FL_EOM flag on the HTX messge. This patch must be backported as far as 2.0. But only CF_EOI must be set because applets are not attached to a conn-stream on older versions. --- diff --git a/src/cache.c b/src/cache.c index 05f81e589e..d50dc9f1ca 100644 --- a/src/cache.c +++ b/src/cache.c @@ -1500,6 +1500,8 @@ static void http_cache_io_handler(struct appctx *appctx) if (appctx->st0 == HTX_CACHE_EOM) { /* no more data are expected. */ res_htx->flags |= HTX_FL_EOM; + si->cs->flags |= CS_FL_EOI; + res->flags |= CF_EOI; appctx->st0 = HTX_CACHE_END; }