]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: http: silently support the "block" action for http-request
authorWilly Tarreau <w@1wt.eu>
Mon, 28 Apr 2014 20:00:46 +0000 (22:00 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 28 Apr 2014 20:00:46 +0000 (22:00 +0200)
This one will be used to convert "block" rules into "http-request block".

src/proto_http.c

index 9632b2761bd4dfdca3710d3587fedfed87054586..875cedcd741a06c26d065381c3cdcfd049cc50ce 100644 (file)
@@ -8695,7 +8695,7 @@ struct http_req_rule *parse_http_req_cond(const char **args, const char *file, i
        if (!strcmp(args[0], "allow")) {
                rule->action = HTTP_REQ_ACT_ALLOW;
                cur_arg = 1;
-       } else if (!strcmp(args[0], "deny")) {
+       } else if (!strcmp(args[0], "deny") || !strcmp(args[0], "block")) {
                rule->action = HTTP_REQ_ACT_DENY;
                cur_arg = 1;
        } else if (!strcmp(args[0], "tarpit")) {