]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: proxy: fix tiny mistakes in parse error messages
authorWilly Tarreau <w@1wt.eu>
Fri, 15 May 2026 08:38:18 +0000 (08:38 +0000)
committerWilly Tarreau <w@1wt.eu>
Fri, 15 May 2026 13:46:46 +0000 (15:46 +0200)
One is s/keyworld/keyword in the retry-on parser. The other one is a
wrong argument "len" being printed in case of parse error for
"declare capture" instead of the length itself.

These can be backported though they are not important.

src/proxy.c

index 3ac67464f5366bf28fd9a75634dc10aa5a795d5e..dab4c5e9a08e58b3974302f2fe1d4d9d3a81e51d 100644 (file)
@@ -903,7 +903,7 @@ static int proxy_parse_declare(char **args, int section, struct proxy *curpx,
                len = strtol(args[4], &error, 10);
                if (*error != '\0') {
                        memprintf(err, "'%s %s': cannot parse the length '%s'.",
-                                 args[0], args[1], args[3]);
+                                 args[0], args[1], args[4]);
                        return -1;
                }
 
@@ -1006,7 +1006,7 @@ proxy_parse_retry_on(char **args, int section, struct proxy *curpx,
                                             PR_RE_JUNK_REQUEST;
                else if (strcmp(args[i], "none") == 0) {
                        if (i != 1 || *args[i + 1]) {
-                               memprintf(err, "'%s' 'none' keyworld only usable alone", args[0]);
+                               memprintf(err, "'%s' 'none' keyword only usable alone", args[0]);
                                return -1;
                        }
                } else {