From: Christopher Faulet Date: Thu, 26 Jan 2023 18:02:07 +0000 (+0100) Subject: BUG/MINOR: http-ana: Fix condition to set LAST termination flag X-Git-Tag: v2.8-dev4~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b74f99383692308d9827e45a723b373cd444c55;p=thirdparty%2Fhaproxy.git BUG/MINOR: http-ana: Fix condition to set LAST termination flag We should not report LAST data in log if the response is in TUNNEL mode on client close/timeout because there is no way to be sure it is the last data. It means, it can only be reported in DONE, CLOSING or CLOSE states. No backport needed. --- diff --git a/src/http_ana.c b/src/http_ana.c index af519a5b9a..09c374ff9c 100644 --- a/src/http_ana.c +++ b/src/http_ana.c @@ -5079,8 +5079,8 @@ void http_set_term_flags(struct stream *s) /* We are still processing the response headers */ s->flags |= SF_FINST_H; } - // (res >= done) & (res->flags & shutw) - else if (s->txn->rsp.msg_state >= HTTP_MSG_DONE && + // (res == (done|closing|closed)) & (res->flags & shutw) + else if (s->txn->rsp.msg_state >= HTTP_MSG_DONE && s->txn->rsp.msg_state < HTTP_MSG_TUNNEL && (s->flags & (SF_ERR_CLITO|SF_ERR_CLICL))) { /* A client error was reported and we are * transmitting the last block of data