File: test-sample-fetch-conv.cfg

package info (click to toggle)
haproxy 1.7.5-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 8,364 kB
  • ctags: 8,494
  • sloc: ansic: 92,976; xml: 1,754; sh: 1,227; python: 1,005; makefile: 831; perl: 550
file content (42 lines) | stat: -rw-r--r-- 1,196 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# This config file aims to trigger all error detection cases in the sample
# fetch expression parser related to the sample converters.

# silence some warnings
defaults
	mode http
	timeout client 1s
	timeout server 1s
	timeout connect 1s

frontend 1
	bind :10000

	# report "missing comma after fetch keyword %s"
	http-request add-header name %[hdr(arg))]

	# report "missing comma after conv keyword %s"
	http-request add-header name %[hdr(arg),ipmask(2))]

	# report "unknown conv method '%s'"
	http-request add-header name %[hdr(arg),blah]

	# report "syntax error: missing ')' after conv keyword '%s'"
	http-request add-header name %[hdr(arg),ipmask(2]

	# no way to report "returns type of conv method '%s' is unknown"

	# "conv method '%s' cannot be applied"
	http-request add-header name %[wait_end,ipmask(2)]

	# "conv method '%s' does not support any args"
	http-request add-header name %[hdr(arg),upper()]

	# "invalid arg %d in conv method '%s' : %s"
	http-request add-header name %[hdr(arg),ipmask(a)]

	# "invalid args in conv method '%s' : %s"
	http-request add-header name %[hdr(arg),map()]

	# "missing args for conv method '%s'"
	http-request add-header name %[hdr(arg),ipmask]