]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: http-rules: remove the unexpected comma before the list of action keywords
authorWilly Tarreau <w@1wt.eu>
Fri, 12 Mar 2021 10:37:05 +0000 (11:37 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 12 Mar 2021 13:13:20 +0000 (14:13 +0100)
The error message for http-request and http-response starts with a comma
that very likely is a leftover from a previous list construct. Let's remove
it: "'http-request' expects , 'wait-for-handshake', 'use-service' ...".

src/http_rules.c

index f77d785eaee27287747706d55bc2c3cd59d0f127..9271112dd87bef076db8169c90ed023a7b7b168d 100644 (file)
@@ -105,8 +105,8 @@ struct act_rule *parse_http_req_cond(const char **args, const char *file, int li
        }
        else {
                action_build_list(&http_req_keywords.list, &trash);
-               ha_alert("parsing [%s:%d]: 'http-request' expects %s%s, but got '%s'%s.\n",
-                        file, linenum, *trash.area ? ", " : "", trash.area,
+               ha_alert("parsing [%s:%d]: 'http-request' expects %s, but got '%s'%s.\n",
+                        file, linenum, trash.area,
                         args[0], *args[0] ? "" : " (missing argument)");
                goto out_err;
        }
@@ -169,8 +169,8 @@ struct act_rule *parse_http_res_cond(const char **args, const char *file, int li
        }
        else {
                action_build_list(&http_res_keywords.list, &trash);
-               ha_alert("parsing [%s:%d]: 'http-response' expects %s%s, but got '%s'%s.\n",
-                        file, linenum, *trash.area ? ", " : "", trash.area,
+               ha_alert("parsing [%s:%d]: 'http-response' expects %s, but got '%s'%s.\n",
+                        file, linenum, trash.area,
                         args[0], *args[0] ? "" : " (missing argument)");
                goto out_err;
        }
@@ -234,8 +234,8 @@ struct act_rule *parse_http_after_res_cond(const char **args, const char *file,
        }
        else {
                action_build_list(&http_after_res_keywords.list, &trash);
-               ha_alert("parsing [%s:%d]: 'http-after-response' expects %s%s, but got '%s'%s.\n",
-                        file, linenum, *trash.area ? ", " : "", trash.area,
+               ha_alert("parsing [%s:%d]: 'http-after-response' expects %s, but got '%s'%s.\n",
+                        file, linenum, trash.area,
                         args[0], *args[0] ? "" : " (missing argument)");
                goto out_err;
        }