]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG: config: error in http-response replace-header number of arguments
authorBaptiste Assmann <bedis9@gmail.com>
Fri, 8 Aug 2014 15:29:06 +0000 (17:29 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 8 Aug 2014 15:50:57 +0000 (17:50 +0200)
A couple of typo fixed in 'http-response replace-header':
- an error when counting the number of arguments
- a typo in the alert message

This should be backported to 1.5.

src/proto_http.c

index e67970117c4b8473a543601583edef5c0c95a21e..b792c6ce1a7f3c4cfa540787239bc86ce3753b31 100644 (file)
@@ -9361,8 +9361,8 @@ struct http_res_rule *parse_http_res_cond(const char **args, const char *file, i
                cur_arg = 1;
 
                if (!*args[cur_arg] || !*args[cur_arg+1] || !*args[cur_arg+2] ||
-                   (*args[cur_arg+3] && strcmp(args[cur_arg+2], "if") != 0 && strcmp(args[cur_arg+2], "unless") != 0)) {
-                       Alert("parsing [%s:%d]: 'http-request %s' expects exactly 3 arguments.\n",
+                   (*args[cur_arg+3] && strcmp(args[cur_arg+3], "if") != 0 && strcmp(args[cur_arg+3], "unless") != 0)) {
+                       Alert("parsing [%s:%d]: 'http-response %s' expects exactly 3 arguments.\n",
                              file, linenum, args[0]);
                        goto out_err;
                }