mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-23 14:51:27 +02:00
MINOR: config: Remove tests on the option 'http-use-htx'
All proxies have now the option PR_O2_USE_HTX set. So it is useless to still test it when the validity of the configuratio is checked.
This commit is contained in:
parent
6d1dd46917
commit
0d79c67103
@ -2538,12 +2538,6 @@ int check_config_validity()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((curproxy->retry_type &~ PR_RE_CONN_FAILED) &&
|
|
||||||
!(curproxy->options2 & PR_O2_USE_HTX)) {
|
|
||||||
ha_warning("Proxy '%s' : retry-on with any other keywords than 'conn-failure' will be ignored, requires 'option http-use-htx'.\n", curproxy->id);
|
|
||||||
err_code |= ERR_WARN;
|
|
||||||
curproxy->retry_type &= PR_RE_CONN_FAILED;
|
|
||||||
}
|
|
||||||
if (curproxy->email_alert.set) {
|
if (curproxy->email_alert.set) {
|
||||||
if (!(curproxy->email_alert.mailers.name && curproxy->email_alert.from && curproxy->email_alert.to)) {
|
if (!(curproxy->email_alert.mailers.name && curproxy->email_alert.from && curproxy->email_alert.to)) {
|
||||||
ha_warning("config : 'email-alert' will be ignored for %s '%s' (the presence any of "
|
ha_warning("config : 'email-alert' will be ignored for %s '%s' (the presence any of "
|
||||||
@ -2610,13 +2604,6 @@ int check_config_validity()
|
|||||||
proxy_mode_str(target->mode), proxy_type_str(target), target->id,
|
proxy_mode_str(target->mode), proxy_type_str(target), target->id,
|
||||||
target->conf.file, target->conf.line);
|
target->conf.file, target->conf.line);
|
||||||
cfgerr++;
|
cfgerr++;
|
||||||
} else if ((curproxy->options2 ^ target->options2) & PR_O2_USE_HTX) {
|
|
||||||
ha_alert("%s %s '%s' (%s:%d) tries to use %s %s '%s' (%s:%d) as its default backend, both of which disagree on 'option http-use-htx'.\n",
|
|
||||||
proxy_mode_str(curproxy->mode), proxy_type_str(curproxy), curproxy->id,
|
|
||||||
curproxy->conf.file, curproxy->conf.line,
|
|
||||||
proxy_mode_str(target->mode), proxy_type_str(target), target->id,
|
|
||||||
target->conf.file, target->conf.line);
|
|
||||||
cfgerr++;
|
|
||||||
} else {
|
} else {
|
||||||
free(curproxy->defbe.name);
|
free(curproxy->defbe.name);
|
||||||
curproxy->defbe.be = target;
|
curproxy->defbe.be = target;
|
||||||
@ -2687,13 +2674,6 @@ int check_config_validity()
|
|||||||
proxy_mode_str(target->mode), proxy_type_str(target), target->id,
|
proxy_mode_str(target->mode), proxy_type_str(target), target->id,
|
||||||
target->conf.file, target->conf.line);
|
target->conf.file, target->conf.line);
|
||||||
cfgerr++;
|
cfgerr++;
|
||||||
} else if ((curproxy->options2 ^ target->options2) & PR_O2_USE_HTX) {
|
|
||||||
ha_alert("%s %s '%s' (%s:%d) tries to use %s %s '%s' (%s:%d) in a 'use_backend' rule, both of which disagree on 'option http-use-htx'.\n",
|
|
||||||
proxy_mode_str(curproxy->mode), proxy_type_str(curproxy), curproxy->id,
|
|
||||||
curproxy->conf.file, curproxy->conf.line,
|
|
||||||
proxy_mode_str(target->mode), proxy_type_str(target), target->id,
|
|
||||||
target->conf.file, target->conf.line);
|
|
||||||
cfgerr++;
|
|
||||||
} else {
|
} else {
|
||||||
free((void *)rule->be.name);
|
free((void *)rule->be.name);
|
||||||
rule->be.backend = target;
|
rule->be.backend = target;
|
||||||
@ -3632,12 +3612,9 @@ out_uri_auth_compat:
|
|||||||
newsrv->mux_proto = mux_ent;
|
newsrv->mux_proto = mux_ent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* the option "http-tunnel" is ignored when HTX is enabled and
|
/* the option "http-tunnel" is deprecated and ignored. So emit a warning if the option is set. */
|
||||||
* only works with the legacy HTTP. So emit a warning if the
|
if ((curproxy->options & PR_O_HTTP_MODE) == PR_O_HTTP_TUN) {
|
||||||
* option is set on a HTX frontend. */
|
ha_warning("config : %s '%s' : the option 'http-tunnel' is deprecated and will be removed in next version.\n",
|
||||||
if ((curproxy->cap & PR_CAP_FE) && curproxy->options2 & PR_O2_USE_HTX &&
|
|
||||||
(curproxy->options & PR_O_HTTP_MODE) == PR_O_HTTP_TUN) {
|
|
||||||
ha_warning("config : %s '%s' : the option 'http-tunnel' is ignored for HTX proxies.\n",
|
|
||||||
proxy_type_str(curproxy), curproxy->id);
|
proxy_type_str(curproxy), curproxy->id);
|
||||||
curproxy->options &= ~PR_O_HTTP_MODE;
|
curproxy->options &= ~PR_O_HTTP_MODE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user