From 5b74f99383692308d9827e45a723b373cd444c55 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Thu, 26 Jan 2023 19:02:07 +0100 Subject: [PATCH] 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. --- src/http_ana.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/http_ana.c b/src/http_ana.c index af519a5b9..09c374ff9 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