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.
This commit is contained in:
Christopher Faulet 2017-03-10 13:52:30 +01:00 committed by Willy Tarreau
parent 9490cedb4e
commit 014e39c0b6

View File

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