Willy Tarreau | 1d7ca2e | 2013-12-13 01:32:09 +0100 | [diff] [blame] | 1 | # This config file aims to trigger all error detection cases in the sample |
| 2 | # fetch expression parser related to the fetch arguments. |
| 3 | |
| 4 | # silence some warnings |
| 5 | defaults |
| 6 | mode http |
| 7 | timeout client 1s |
| 8 | timeout server 1s |
| 9 | timeout connect 1s |
| 10 | |
| 11 | frontend 1 |
| 12 | bind :10000 |
| 13 | |
| 14 | # missing fetch method |
| 15 | http-request add-header name %[(arg)] |
| 16 | |
| 17 | # unknown fetch method 'blah' |
| 18 | http-request add-header name %[blah(arg)] |
| 19 | |
| 20 | # missing closing ')' after arguments to fetch keyword 'req.hdr' |
| 21 | http-request add-header name %[req.hdr(] |
| 22 | |
Ilya Shipitsin | d425950 | 2020-04-08 01:07:56 +0500 | [diff] [blame] | 23 | # cannot be triggered : "returns type of fetch method '%s' is unknown" |
Willy Tarreau | 1d7ca2e | 2013-12-13 01:32:09 +0100 | [diff] [blame] | 24 | |
| 25 | # fetch method 'always_true' : no argument supported, but got 'arg' |
| 26 | http-request add-header name %[always_true(arg)] |
| 27 | |
| 28 | # fetch method 'req.hdr' : failed to parse 'a' as 'signed integer' at position 2 |
| 29 | http-request add-header name %[req.hdr(a,a)] |
| 30 | |
| 31 | # invalid args in fetch method 'payload_lv' : payload length must be > 0 |
| 32 | http-request add-header name %[payload_lv(0,0)] |
| 33 | |
| 34 | # fetch method 'payload_lv' : expected type 'unsigned integer' at position 1, but got nothing |
| 35 | http-request add-header name %[payload_lv] |
| 36 | |