BUG/MINOR: http-ana: Don't eval front after-response rules if stopped on back
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 15 Oct 2021 11:51:34 +0000 (13:51 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 19 Oct 2021 13:55:44 +0000 (15:55 +0200)
commita9ebab6e22c1e90d8584b6cd6bc5c1a206db02a2
tree0af3b6544b240945cc7e91299693699edc193710
parente3e23748d11f3881cb346b7d4e5d8d463fdd19e6
BUG/MINOR: http-ana: Don't eval front after-response rules if stopped on back

http-after-response rules evaluation must be stopped after a "allow". It
means the frontend ruleset must not be evaluated if a "allow" was performed
in the backend ruleset. Internally, the evaluation must be stopped if on
HTTP_RULE_RES_STOP return value. Only the "allow" action is concerned by
this change.

Thanks to this patch, http-response and http-after-response behave in the
same way.

This patch should be backported as far as 2.2.

(cherry picked from commit 597909f4e67866c4f3ecf77f95f2cd4556c0c638)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 085ccd4fe42706230c2a31c162d8664ca6fb16a4)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
reg-tests/http-rules/http_after_response.vtc
src/http_ana.c