mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 23:56:57 +02:00
Revert "MINOR: http_htx/errors: prevent the use of some keywords when not in tcp/http mode"
This reverts commit b41b77b4cc
since we
cannot perform the test during parsing as the effective proxy mode is
not yet known.
This commit is contained in:
parent
0f9b475333
commit
33e5c4055f
@ -2014,12 +2014,6 @@ static int proxy_parse_errorloc(char **args, int section, struct proxy *curpx,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (curpx->mode != PR_MODE_TCP && curpx->mode != PR_MODE_HTTP) {
|
|
||||||
memprintf(errmsg, "%s : requires TCP or HTTP mode.\n", args[0]);
|
|
||||||
ret = -1;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (*(args[1]) == 0 || *(args[2]) == 0) {
|
if (*(args[1]) == 0 || *(args[2]) == 0) {
|
||||||
memprintf(errmsg, "%s : expects <status_code> and <url> as arguments.\n", args[0]);
|
memprintf(errmsg, "%s : expects <status_code> and <url> as arguments.\n", args[0]);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
@ -2087,12 +2081,6 @@ static int proxy_parse_errorfile(char **args, int section, struct proxy *curpx,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (curpx->mode != PR_MODE_TCP && curpx->mode != PR_MODE_HTTP) {
|
|
||||||
memprintf(errmsg, "%s : requires TCP or HTTP mode.\n", args[0]);
|
|
||||||
ret = -1;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (*(args[1]) == 0 || *(args[2]) == 0) {
|
if (*(args[1]) == 0 || *(args[2]) == 0) {
|
||||||
memprintf(errmsg, "%s : expects <status_code> and <file> as arguments.\n", args[0]);
|
memprintf(errmsg, "%s : expects <status_code> and <file> as arguments.\n", args[0]);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
@ -2156,12 +2144,6 @@ static int proxy_parse_errorfiles(char **args, int section, struct proxy *curpx,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (curpx->mode != PR_MODE_TCP && curpx->mode != PR_MODE_HTTP) {
|
|
||||||
memprintf(err, "%s : requires TCP or HTTP mode.\n", args[0]);
|
|
||||||
ret = -1;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!*(args[1])) {
|
if (!*(args[1])) {
|
||||||
memprintf(err, "%s : expects <name> as argument.", args[0]);
|
memprintf(err, "%s : expects <name> as argument.", args[0]);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
@ -2225,11 +2207,6 @@ static int proxy_parse_http_error(char **args, int section, struct proxy *curpx,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (curpx->mode != PR_MODE_TCP && curpx->mode != PR_MODE_HTTP) {
|
|
||||||
memprintf(errmsg, "%s : requires TCP or HTTP mode.\n", args[0]);
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
|
|
||||||
cur_arg = 1;
|
cur_arg = 1;
|
||||||
curpx->conf.args.ctx = ARGC_HERR;
|
curpx->conf.args.ctx = ARGC_HERR;
|
||||||
reply = http_parse_http_reply((const char **)args, &cur_arg, curpx, 0, errmsg);
|
reply = http_parse_http_reply((const char **)args, &cur_arg, curpx, 0, errmsg);
|
||||||
|
Loading…
Reference in New Issue
Block a user