]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: checks: Use ver keyword to specify the HTTP version for http checks
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 28 Apr 2020 07:37:00 +0000 (09:37 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 28 Apr 2020 07:37:01 +0000 (09:37 +0200)
'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.

doc/configuration.txt
reg-tests/checks/http-check.vtc
src/checks.c

index 6e39c89d9b920091efacba331a6aaab952369b5d..1348891bb9ee5e864c81788bb9d7d61b6196f7fa 100644 (file)
@@ -4644,7 +4644,7 @@ http-check expect [min-recv <int>] [comment <msg>]
              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.
@@ -4664,7 +4664,7 @@ http-check send [meth <method>] [uri <uri>] [vsn <version>] [comment <msg>]
                    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
index 7d8d514428e30afd3175de2139bfcf2d16135749..057484f24c6e346a05f9f52acd43a2fa13ebbf58 100644 (file)
@@ -103,7 +103,7 @@ haproxy h1 -conf {
     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
@@ -113,11 +113,11 @@ haproxy h1 -conf {
         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
index 0b934b663708294c528fc4d7c14591678594ca31..4279290b3f9647b2a26e25c68c1a13fa66c63580 100644 (file)
@@ -3758,7 +3758,7 @@ static struct tcpcheck_rule *parse_tcpcheck_send_http(char **args, int cur_arg,
                        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;
@@ -3799,7 +3799,7 @@ static struct tcpcheck_rule *parse_tcpcheck_send_http(char **args, int cur_arg,
                        }
                }
                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;
                }