]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: config: Warn only if the option http-use-htx is used with "no" prefix
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 19 Jul 2019 09:17:38 +0000 (11:17 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 19 Jul 2019 09:39:19 +0000 (11:39 +0200)
No warning message is emitted anymore if the option is used to enable the
HTX. But it is still diplayed when the "no" prefix is used to disable the HTX
explicitly. So, for existing configs, we display a warning only if there is a
change in the behavior of HAProxy between the 2.1 and the previous versions.

src/cfgparse-listen.c

index cf3cb56b94f9551818df710f78a3d9d07c22d105..656031b0a45ee8e25c6888c5dc4abe9cbe50a086 100644 (file)
@@ -2009,10 +2009,12 @@ stats_error_parsing:
 
                                /* "[no] option http-use-htx" is deprecated */
                                if (!strcmp(cfg_opts2[optnum].name, "http-use-htx")) {
-                                       ha_warning("parsing [%s:%d]: option '%s' is deprecated and ignored."
-                                                  " The HTX mode is now the only supported mode.\n",
-                                                  file, linenum, cfg_opts2[optnum].name);
-                                       err_code |= ERR_WARN;
+                                       if (kwm ==KWM_NO) {
+                                               ha_warning("parsing [%s:%d]: option '%s' is deprecated and ignored."
+                                                          " The HTX mode is now the only supported mode.\n",
+                                                          file, linenum, cfg_opts2[optnum].name);
+                                               err_code |= ERR_WARN;
+                                       }
                                        goto out;
                                }