From: Christopher Faulet Date: Mon, 15 Jul 2019 12:56:44 +0000 (+0200) Subject: MINOR: config: Remove tests on the option 'http-use-htx' X-Git-Tag: v2.1-dev2~370 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d79c671031d6f584cc1efbebf8872ff546178f1;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/cfgparse.c b/src/cfgparse.c index 9bfe874505..dd0b969119 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -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.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 " @@ -2610,13 +2604,6 @@ int check_config_validity() proxy_mode_str(target->mode), proxy_type_str(target), target->id, target->conf.file, target->conf.line); 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 { free(curproxy->defbe.name); curproxy->defbe.be = target; @@ -2687,13 +2674,6 @@ int check_config_validity() proxy_mode_str(target->mode), proxy_type_str(target), target->id, target->conf.file, target->conf.line); 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 { free((void *)rule->be.name); rule->be.backend = target; @@ -3632,12 +3612,9 @@ out_uri_auth_compat: newsrv->mux_proto = mux_ent; } - /* the option "http-tunnel" is ignored when HTX is enabled and - * only works with the legacy HTTP. So emit a warning if the - * option is set on a HTX frontend. */ - 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", + /* the option "http-tunnel" is deprecated and ignored. So emit a warning if the option is set. */ + if ((curproxy->options & PR_O_HTTP_MODE) == PR_O_HTTP_TUN) { + ha_warning("config : %s '%s' : the option 'http-tunnel' is deprecated and will be removed in next version.\n", proxy_type_str(curproxy), curproxy->id); curproxy->options &= ~PR_O_HTTP_MODE; }