]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MINOR] acl: don't report valid acls as potential mistakes
authorKrzysztof Piotr Oledzki <ole@ans.pl>
Sun, 4 Oct 2009 22:23:35 +0000 (00:23 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 8 Oct 2009 05:00:07 +0000 (07:00 +0200)
Commit 404e8ab4615d564a74f92a0d3822b0292dd6224f introduced
smart checking for stupid acl typos. However, now haproxy shows
the warning even for valid acls, like this one:
acl Cookie-X-NoAccel    hdr_reg(cookie) (^|\ |;)X-NoAccel=1(;|$)

src/acl.c

index 77ca627e525577d4b078703ed9cb0e0d2ad45009..0ded6bf82b7ca06f1521ef9c8ea5ca8a5f911a9c 100644 (file)
--- a/src/acl.c
+++ b/src/acl.c
@@ -766,7 +766,7 @@ struct acl *parse_acl(const char **args, struct list *known_acl)
         * subject, as this is almost certainly a typo. Right now we can only
         * emit a warning, so let's do so.
         */
-       if (*args[2] == '(')
+       if (!strchr(args[1], '(') && *args[2] == '(')
                Warning("parsing acl '%s' :\n"
                        "  matching '%s' for pattern '%s' is likely a mistake and probably\n"
                        "  not what you want. Maybe you need to remove the extraneous space before '('.\n"