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.
This commit is contained in:
Christopher Faulet 2023-01-26 19:02:07 +01:00
parent b3ef9c392e
commit 5b74f99383

View File

@ -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