]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: http: fix misleading error message for response captures
authorWilly Tarreau <w@1wt.eu>
Fri, 24 Jun 2016 13:36:34 +0000 (15:36 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 24 Jun 2016 13:36:34 +0000 (15:36 +0200)
Kay Fuchs reported that the error message is misleading in response
captures because it suggests that "len" is accepted while it's not.

This needs to be backported to 1.6.

src/proto_http.c

index 4a6e6d34b6d0df3feffb6df78cbe4ab3ff739679..bab3db5d8e52f447b41915c694776c30052fb701 100644 (file)
@@ -12519,7 +12519,7 @@ enum act_parse_ret parse_http_res_capture(const char **args, int *orig_arg, stru
                        break;
 
        if (cur_arg < *orig_arg + 3) {
-               memprintf(err, "expects <expression> [ 'len' <length> | id <idx> ]");
+               memprintf(err, "expects <expression> id <idx>");
                return ACT_RET_PRS_ERR;
        }
 
@@ -12537,7 +12537,7 @@ enum act_parse_ret parse_http_res_capture(const char **args, int *orig_arg, stru
        }
 
        if (!args[cur_arg] || !*args[cur_arg]) {
-               memprintf(err, "expects 'len or 'id'");
+               memprintf(err, "expects 'id'");
                free(expr);
                return ACT_RET_PRS_ERR;
        }