[MINOR] acl: don't report valid acls as potential mistakes

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(;|$)
This commit is contained in:
Krzysztof Piotr Oledzki 2009-10-05 00:23:35 +02:00 committed by Willy Tarreau
parent ba255bc3c8
commit 4cdd8314e9

View File

@ -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"