mirror of
https://github.com/haproxy/haproxy.git
synced 2026-03-14 06:32:11 -04:00
BUG/MINOR: tcpcheck: Fix typo in error error message for http-check expect
With a config:
backend bk_app
http-check expect status 200 string "status: ok"
This now correctly emits the error:
config : parsing [./patch.cfg:2] : 'http-check expect' : only one pattern expected.
This line containing the typo is unchanged since at least HAProxy 2.2, the
patch should be backported into all supported branches.
This commit is contained in:
parent
73732abfb2
commit
760fef1fc0
1 changed files with 6 additions and 6 deletions
|
|
@ -3262,7 +3262,7 @@ struct tcpcheck_rule *parse_tcpcheck_expect(char **args, int cur_arg, struct pro
|
|||
}
|
||||
else if (strcmp(args[cur_arg], "string") == 0 || strcmp(args[cur_arg], "rstring") == 0) {
|
||||
if (type != TCPCHK_EXPECT_UNDEF) {
|
||||
memprintf(errmsg, "only on pattern expected");
|
||||
memprintf(errmsg, "only one pattern expected");
|
||||
goto error;
|
||||
}
|
||||
if (proto != TCPCHK_RULES_HTTP_CHK)
|
||||
|
|
@ -3281,7 +3281,7 @@ struct tcpcheck_rule *parse_tcpcheck_expect(char **args, int cur_arg, struct pro
|
|||
if (proto == TCPCHK_RULES_HTTP_CHK)
|
||||
goto bad_http_kw;
|
||||
if (type != TCPCHK_EXPECT_UNDEF) {
|
||||
memprintf(errmsg, "only on pattern expected");
|
||||
memprintf(errmsg, "only one pattern expected");
|
||||
goto error;
|
||||
}
|
||||
type = ((*(args[cur_arg]) == 'b') ? TCPCHK_EXPECT_BINARY : TCPCHK_EXPECT_BINARY_REGEX);
|
||||
|
|
@ -3295,7 +3295,7 @@ struct tcpcheck_rule *parse_tcpcheck_expect(char **args, int cur_arg, struct pro
|
|||
}
|
||||
else if (strcmp(args[cur_arg], "string-lf") == 0 || strcmp(args[cur_arg], "binary-lf") == 0) {
|
||||
if (type != TCPCHK_EXPECT_UNDEF) {
|
||||
memprintf(errmsg, "only on pattern expected");
|
||||
memprintf(errmsg, "only one pattern expected");
|
||||
goto error;
|
||||
}
|
||||
if (proto != TCPCHK_RULES_HTTP_CHK)
|
||||
|
|
@ -3317,7 +3317,7 @@ struct tcpcheck_rule *parse_tcpcheck_expect(char **args, int cur_arg, struct pro
|
|||
if (proto != TCPCHK_RULES_HTTP_CHK)
|
||||
goto bad_tcp_kw;
|
||||
if (type != TCPCHK_EXPECT_UNDEF) {
|
||||
memprintf(errmsg, "only on pattern expected");
|
||||
memprintf(errmsg, "only one pattern expected");
|
||||
goto error;
|
||||
}
|
||||
type = ((*(args[cur_arg]) == 's') ? TCPCHK_EXPECT_HTTP_STATUS : TCPCHK_EXPECT_HTTP_STATUS_REGEX);
|
||||
|
|
@ -3335,7 +3335,7 @@ struct tcpcheck_rule *parse_tcpcheck_expect(char **args, int cur_arg, struct pro
|
|||
goto error;
|
||||
}
|
||||
if (type != TCPCHK_EXPECT_UNDEF) {
|
||||
memprintf(errmsg, "only on pattern expected");
|
||||
memprintf(errmsg, "only one pattern expected");
|
||||
goto error;
|
||||
}
|
||||
type = TCPCHK_EXPECT_CUSTOM;
|
||||
|
|
@ -3346,7 +3346,7 @@ struct tcpcheck_rule *parse_tcpcheck_expect(char **args, int cur_arg, struct pro
|
|||
if (proto != TCPCHK_RULES_HTTP_CHK)
|
||||
goto bad_tcp_kw;
|
||||
if (type != TCPCHK_EXPECT_UNDEF) {
|
||||
memprintf(errmsg, "only on pattern expected");
|
||||
memprintf(errmsg, "only one pattern expected");
|
||||
goto error;
|
||||
}
|
||||
type = TCPCHK_EXPECT_HTTP_HEADER;
|
||||
|
|
|
|||
Loading…
Reference in a new issue