From: Willy Tarreau Date: Fri, 12 Mar 2021 10:37:05 +0000 (+0100) Subject: CLEANUP: http-rules: remove the unexpected comma before the list of action keywords X-Git-Tag: v2.4-dev12~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25809999fe7fe031f890b1c98f000b48819854cc;p=thirdparty%2Fhaproxy.git CLEANUP: http-rules: remove the unexpected comma before the list of action keywords 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' ...". --- diff --git a/src/http_rules.c b/src/http_rules.c index f77d785eae..9271112dd8 100644 --- a/src/http_rules.c +++ b/src/http_rules.c @@ -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; }