From: Christopher Faulet Date: Tue, 18 Jul 2017 20:01:05 +0000 (+0200) Subject: BUG/MINOR: http: Fix bug introduced in previous patch in http_resync_states X-Git-Tag: v1.8-dev3~230 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a81ff60454e2cec95bb843034cf2ac62f791f6c1;p=thirdparty%2Fhaproxy.git BUG/MINOR: http: Fix bug introduced in previous patch in http_resync_states The previous patch ("MINOR: http: Rely on analyzers mask to end processing in forward_body functions") contains a bug for keep-alive transactions. For these transactions, AN_REQ_FLT_END and AN_RES_FLT_END analyzers must be removed only when all outgoing data was forwarded. --- diff --git a/src/proto_http.c b/src/proto_http.c index e5212cc78e..f9dc8a1b44 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -5665,9 +5665,11 @@ void http_resync_states(struct stream *s) s->req.flags |= CF_WAKE_WRITE; else if (s->res.buf->o) s->res.flags |= CF_WAKE_WRITE; - s->req.analysers = AN_REQ_FLT_END; - s->res.analysers = AN_RES_FLT_END; - txn->flags |= TX_WAIT_CLEANUP; + else { + s->req.analysers = AN_REQ_FLT_END; + s->res.analysers = AN_RES_FLT_END; + txn->flags |= TX_WAIT_CLEANUP; + } } }