mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 15:47:01 +02:00
Revert "MINOR: tcp_rules: tcp-{request,response} requires TCP or HTTP mode"
This reverts commit 09b15e4163
since
we cannot perform the test during parsing as the effective proxy mode is
not yet known.
This commit is contained in:
parent
b6e1e9ec8b
commit
8e20fdbb1c
@ -1105,12 +1105,6 @@ static int tcp_parse_tcp_rep(char **args, int section_type, struct proxy *curpx,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (curpx->mode != PR_MODE_TCP && curpx->mode != PR_MODE_HTTP) {
|
|
||||||
memprintf(err, "%s %s is not allowed because %s %s is not in TCP or HTTP mode",
|
|
||||||
args[0], args[1], proxy_type_str(curpx), curpx->id);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strcmp(args[1], "inspect-delay") == 0) {
|
if (strcmp(args[1], "inspect-delay") == 0) {
|
||||||
if ((curpx == defpx && strlen(defpx->id) == 0) || !(curpx->cap & PR_CAP_BE)) {
|
if ((curpx == defpx && strlen(defpx->id) == 0) || !(curpx->cap & PR_CAP_BE)) {
|
||||||
memprintf(err, "%s %s is only allowed in 'backend' sections or 'defaults' section with a name",
|
memprintf(err, "%s %s is only allowed in 'backend' sections or 'defaults' section with a name",
|
||||||
@ -1228,12 +1222,6 @@ static int tcp_parse_tcp_req(char **args, int section_type, struct proxy *curpx,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (curpx->mode != PR_MODE_TCP && curpx->mode != PR_MODE_HTTP) {
|
|
||||||
memprintf(err, "%s %s is not allowed because %s %s is not in TCP or HTTP mode",
|
|
||||||
args[0], args[1], proxy_type_str(curpx), curpx->id);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strcmp(args[1], "inspect-delay") == 0) {
|
if (strcmp(args[1], "inspect-delay") == 0) {
|
||||||
if (curpx == defpx && strlen(defpx->id) == 0) {
|
if (curpx == defpx && strlen(defpx->id) == 0) {
|
||||||
memprintf(err, "%s %s is not allowed in anonymous 'defaults' sections",
|
memprintf(err, "%s %s is not allowed in anonymous 'defaults' sections",
|
||||||
|
Loading…
Reference in New Issue
Block a user