]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
DOC: config: explain how default matching method for ACL works
authorWilly Tarreau <w@1wt.eu>
Fri, 25 Nov 2022 09:49:41 +0000 (10:49 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 25 Nov 2022 09:49:41 +0000 (10:49 +0100)
In issue #698, it's made apparent that the default matching method for
ACL keywords can be confusing when a converter is applied, because
depending on the converters used, users may think that the default
matching method from the sample fetch name might apply to the whole
expression. It's easier to understand that this doesn't make sense
when thinking about converters turning to completely different types
(e.g. hdr_beg(host),do_resolve() returns an IP, thus it's obvious
that _beg makes no sense at all).  This patch states this in the
doc to avoid future confusion.

doc/configuration.txt

index afe2498e7d8a003d915ec2e58f4660dd08c3d055..94a9a5aba23111fe9c3acefa03bdb9d85b12fef4 100644 (file)
@@ -16470,7 +16470,11 @@ possible to convert the sample to lowercase before matching, like this :
 All ACL-specific criteria imply a default matching method. Most often, these
 criteria are composed by concatenating the name of the original sample fetch
 method and the matching method. For example, "hdr_beg" applies the "beg" match
-to samples retrieved using the "hdr" fetch method. Since all ACL-specific
+to samples retrieved using the "hdr" fetch method. This matching method is only
+usable when the keyword is used alone, without any converter. In case any such
+converter were to be applied after such an ACL keyword, the default matching
+method from the ACL keyword is simply ignored since what will matter for the
+matching is the output type of the last converter. Since all ACL-specific
 criteria rely on a sample fetch method, it is always possible instead to use
 the original sample fetch method and the explicit matching method using "-m".