BUG/MINOR: http-rules: Fix ACLs parsing for http deny rules
The parsing of http deny rules with no argument or only the deny_status argument
is buggy if followed by an ACLs expression (starting with "if" or "unless"
keyword). Instead of using the proxy errorfiles, a dummy error is used. To fix
the bug, the parsing function must also check for "if" or "unless" keyword in
such cases.
This patch should fix the issue #720. No backport is needed.
diff --git a/reg-tests/http-errorfiles/http_errors.vtc b/reg-tests/http-errorfiles/http_errors.vtc
index 7d9f18c..37e08cc 100644
--- a/reg-tests/http-errorfiles/http_errors.vtc
+++ b/reg-tests/http-errorfiles/http_errors.vtc
@@ -34,7 +34,7 @@
frontend fe1
bind "fd@${fe1}"
http-request deny deny_status 400 if { path /400 }
- http-request deny deny_status 403 if { path /403 }
+ http-request deny if { path /403 }
http-request deny deny_status 404 if { path /404 }
http-request deny deny_status 500 if { path /500 }
@@ -43,7 +43,7 @@
errorfiles errors-1
errorfile 500 ${testdir}/errors/500.http
http-request deny deny_status 400 if { path /400 }
- http-request deny deny_status 403 if { path /403 }
+ http-request deny if { path /403 }
http-request deny deny_status 404 if { path /404 }
http-request deny deny_status 500 if { path /500 }
@@ -53,7 +53,7 @@
errorfiles errors-1 500
errorfiles errors-3 400
http-request deny deny_status 400 if { path /400 }
- http-request deny deny_status 403 if { path /403 }
+ http-request deny if { path /403 }
http-request deny deny_status 404 if { path /404 }
http-request deny deny_status 500 if { path /500 }
} -start