blob: cb0be09b801670a7e129d4d6ad6325f084eb6bf4 [file] [log] [blame]
Willy Tarreau1d7ca2e2013-12-13 01:32:09 +01001# 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
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
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 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'
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