]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: config: Remove tests on the option 'http-use-htx'
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 15 Jul 2019 12:56:44 +0000 (14:56 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 19 Jul 2019 07:18:27 +0000 (09:18 +0200)
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.

src/cfgparse.c

index 9bfe8745059fa7229337245746660655e083ecbf..dd0b969119b52eb443aaf3bf0f40fd810508da43 100644 (file)
@@ -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;
                }