'ver' keyword is already used by sample fetches while 'vsn' is not used anywhere
else. So better to use 'ver' too for http-check send rules.
and "http-check send".
-http-check send [meth <method>] [uri <uri>] [vsn <version>] [comment <msg>]
+http-check send [meth <method>] [uri <uri>] [ver <version>] [comment <msg>]
[hdr <name> <fmt>]* [body <string>]
Add a possible list of headers and/or a body to the request sent during HTTP
health checks.
any server, but may be changed to any other URI. Query
strings are permitted.
- vsn <version> is the optional HTTP version string. It defaults to
+ ver <version> is the optional HTTP version string. It defaults to
"HTTP/1.0" but some servers might behave incorrectly in HTTP
1.0, so turningit to HTTP/1.1 may sometimes help. Note that
the Host field is mandatory in HTTP/1.1, use "hdr" argument
backend be3
log ${S1_addr}:${S1_port} len 2048 local0
option httpchk
- http-check send meth GET uri /status vsn HTTP/1.1
+ http-check send meth GET uri /status ver HTTP/1.1
server srv ${s3_addr}:${s3_port} check inter 100ms rise 1 fall 1
backend be4
http-check send-state
http-check connect addr ${s4_addr}:${s4_port}
http-check set-var(check.server) "str(srv)"
- http-check send meth GET uri /req1 vsn HTTP/1.1 hdr x-test "server=%[var(check.server)]"
+ http-check send meth GET uri /req1 ver HTTP/1.1 hdr x-test "server=%[var(check.server)]"
http-check expect status 200
http-check connect addr ${s4_addr} port ${s4_port}
http-check unset-var(check.server)
- http-check send meth GET uri /req2 vsn HTTP/1.1 hdr x-test "server=%[var(check.server)]" body "health-check body"
+ http-check send meth GET uri /req2 ver HTTP/1.1 hdr x-test "server=%[var(check.server)]" body "health-check body"
http-check expect rstatus "^2[0-9]{2}"
http-check connect addr ${s4_addr} port ${s4_port}
http-check send meth GET uri /req3
uri = args[cur_arg];
// TODO: log-format uri
}
- else if (strcmp(args[cur_arg], "vsn") == 0) {
+ else if (strcmp(args[cur_arg], "ver") == 0) {
if (!*(args[cur_arg+1])) {
memprintf(errmsg, "'%s' expects a string as argument.", args[cur_arg]);
goto error;
}
}
else {
- memprintf(errmsg, "expects 'comment', 'meth', 'uri', 'hdr' and 'body' but got '%s' as argument.",
+ memprintf(errmsg, "expects 'comment', 'meth', 'uri', 'ver', 'hdr' and 'body' but got '%s' as argument.",
args[cur_arg]);
goto error;
}