]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: http-rules: Abort transaction when a redirect is applied on response
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 6 Mar 2020 14:44:37 +0000 (15:44 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 6 Mar 2020 14:44:38 +0000 (15:44 +0100)
In the same way than for the request, when a redirect rule is applied the
transction is aborted. This must be done returning HTTP_RULE_RES_ABRT from
http_res_get_intercept_rule() function.

No backport needed because on previous versions, the action return values are
not handled the same way.

src/http_ana.c

index 34967b876ef96ddadd3f17f951225ca87c272906..88f7937b194846d7f8396f2c3209794c9efdd683 100644 (file)
@@ -3110,7 +3110,7 @@ resume_execution:
                                break;
 
                        case ACT_HTTP_REDIR:
-                               rule_ret = HTTP_RULE_RES_DONE;
+                               rule_ret = HTTP_RULE_RES_ABRT;
                                if (!http_apply_redirect_rule(rule->arg.redir, s, txn))
                                        rule_ret = HTTP_RULE_RES_ERROR;
                                goto end;