]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: acl: automatically detect the type of certain fetches
authorWilly Tarreau <w@1wt.eu>
Tue, 11 Jun 2013 19:09:06 +0000 (21:09 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 11 Jun 2013 19:09:06 +0000 (21:09 +0200)
commit9987ea99673cdc552f43b46fb49d1f47cffbd5df
treec79eb7e3ad9213f4a222101e1ae6cf6f47c5c19a
parent4f0d919bd4951d2f22f2334f694a39d5d940aa10
MEDIUM: acl: automatically detect the type of certain fetches

Commit bef91e71 added the possibility to automatically use some fetch
functions instead of ACL functions, but for the fetch output type was
never used and setting the match method using -m was always mandatory.

Some fetch types are non-ambiguous and can intuitively be associated
with some ACL types :

    SMP_T_BOOL      -> bool
    SMP_T_UINT/SINT -> int
    SMP_T_IPV4/IPV6 -> ip

So let's have the ACL expression parser detect these ones automatically.

Other types are more ambiguous, especially everything related to strings,
as there are many string matching methods available and none of them is
the obvious standard matching method for any string. These ones will still
have to be specified using -m.
src/acl.c