blob: 26b909facdb5231c17c577a6f19ce70a9141035f [file] [log] [blame]
Willy Tarreau1d7ca2e2013-12-13 01:32:09 +01001# This config file aims to trigger all error detection cases in the ACL
2# expression parser related to the fetch arguments.
3
4# silence some warnings
5defaults
6 mode http
7 timeout client 1s
8 timeout server 1s
9 timeout connect 1s
10
11frontend 1
12 bind :10000
13
14 # missing fetch method in ACL expression '(arg)'.
Willy Tarreaud4359fd2021-04-02 10:49:34 +020015 http-request deny if { (arg) }
Willy Tarreau1d7ca2e2013-12-13 01:32:09 +010016
17 # unknown fetch method 'blah' in ACL expression 'blah(arg)'.
Willy Tarreaud4359fd2021-04-02 10:49:34 +020018 http-request deny if { blah(arg) }
Willy Tarreau1d7ca2e2013-12-13 01:32:09 +010019
20 # missing closing ')' after arguments to fetch keyword 'req.hdr' in ACL expression 'req.hdr('.
Willy Tarreaud4359fd2021-04-02 10:49:34 +020021 http-request deny if { req.hdr( }
Willy Tarreau1d7ca2e2013-12-13 01:32:09 +010022
Ilya Shipitsind4259502020-04-08 01:07:56 +050023 # cannot be triggered : "returns type of fetch method '%s' is unknown"
Willy Tarreau1d7ca2e2013-12-13 01:32:09 +010024
25 # fetch method 'always_true' : no argument supported, but got 'arg' in ACL expression 'always_true(arg)'.
Willy Tarreaud4359fd2021-04-02 10:49:34 +020026 http-request deny if { always_true(arg) }
Willy Tarreau1d7ca2e2013-12-13 01:32:09 +010027
28 # fetch method 'req.hdr' : failed to parse 'a' as type 'signed integer' at position 2 in ACL expression 'req.hdr(a,a)'.
Willy Tarreaud4359fd2021-04-02 10:49:34 +020029 http-request deny if { req.hdr(a,a) }
Willy Tarreau1d7ca2e2013-12-13 01:32:09 +010030
31 # in argument to 'payload_lv', payload length must be > 0.
Willy Tarreaud4359fd2021-04-02 10:49:34 +020032 http-request deny if { payload_lv(0,0) }
Willy Tarreau1d7ca2e2013-12-13 01:32:09 +010033
34 # ACL keyword 'payload_lv' : expected type 'unsigned integer' at position 1, but got nothing.
Willy Tarreaud4359fd2021-04-02 10:49:34 +020035 http-request deny if { payload_lv }
Willy Tarreau1d7ca2e2013-12-13 01:32:09 +010036