From: Christopher Faulet Date: Fri, 10 Mar 2017 12:52:30 +0000 (+0100) Subject: BUG/MAJOR: http: fix typo in http_apply_redirect_rule X-Git-Tag: v1.8-dev1~66 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=014e39c0b6ec5abb3fc4dabf4e80bb758b3548dd;p=thirdparty%2Fhaproxy.git BUG/MAJOR: http: fix typo in http_apply_redirect_rule Because of this typo, AN_RES_FLT_END was never called when a redirect rule is applied on a keep-alive connection. In almost all cases, this bug has no effect. But, it leads to a memory leak if a redirect is done on a http-response rule when the HTTP compression is enabled. This patch should be backported in 1.7. --- diff --git a/src/proto_http.c b/src/proto_http.c index 6d55e6a8a7..0cafdb493f 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -4279,7 +4279,7 @@ static int http_apply_redirect_rule(struct redirect_rule *rule, struct stream *s req->next -= req->sov; req->sov = 0; s->req.analysers = AN_REQ_HTTP_XFER_BODY | (s->req.analysers & AN_REQ_FLT_END); - s->res.analysers = AN_RES_HTTP_XFER_BODY | (s->req.analysers & AN_RES_FLT_END); + s->res.analysers = AN_RES_HTTP_XFER_BODY | (s->res.analysers & AN_RES_FLT_END); req->msg_state = HTTP_MSG_CLOSED; res->msg_state = HTTP_MSG_DONE; /* Trim any possible response */