]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: proxy: Remove support of the option 'http-tunnel'
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 16 Jul 2019 13:04:46 +0000 (15:04 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 19 Jul 2019 07:24:12 +0000 (09:24 +0200)
The option 'http-tunnel' is deprecated and it was only used in the legacy HTTP
mode. So this option is now totally ignored and a warning is emitted during
HAProxy startup if it is found in a configuration file.

include/types/proxy.h
src/cfgparse-listen.c
src/cfgparse.c

index 55afed771267c1c2ba0d0ae743a892e8f4997389..86788a1e6e3baae973f1ec600c69a85ee5ee67fd 100644 (file)
@@ -117,8 +117,8 @@ enum PR_SRV_STATE_FILE {
 #define PR_O_HTTP_KAL   0x00000000      /* HTTP keep-alive mode (http-keep-alive) */
 #define PR_O_HTTP_CLO   0x01000000      /* HTTP close mode (httpclose) */
 #define PR_O_HTTP_SCL   0x02000000      /* HTTP server close mode (http-server-close) */
-#define PR_O_HTTP_TUN   0x04000000      /* HTTP tunnel mode : no analysis past first request/response */
-#define PR_O_HTTP_MODE  0x07000000      /* MASK to retrieve the HTTP mode */
+#define PR_O_HTTP_MODE  0x03000000      /* MASK to retrieve the HTTP mode */
+/* unused: 0x04000000 */
 
 #define PR_O_TCPCHK_SSL 0x08000000     /* at least one TCPCHECK connect rule requires SSL */
 #define PR_O_CONTSTATS 0x10000000      /* continuous counters */
index 9c266bd79b9279c3eee83fc5887d036949786c76..c2741a46cd266935736ce9b7112a00d98693bbb9 100644 (file)
@@ -2232,22 +2232,10 @@ stats_error_parsing:
                        }
                }
                else if (strcmp(args[1], "http-tunnel") == 0) {
-                       if (warnifnotcap(curproxy, PR_CAP_FE, file, linenum, args[1], NULL)) {
-                               err_code |= ERR_WARN;
-                               goto out;
-                       }
-                       if (alertif_too_many_args_idx(0, 1, file, linenum, args, &err_code))
-                               goto out;
-                       if (kwm == KWM_STD) {
-                               curproxy->options &= ~PR_O_HTTP_MODE;
-                               curproxy->options |= PR_O_HTTP_TUN;
-                               goto out;
-                       }
-                       else if (kwm == KWM_NO) {
-                               if ((curproxy->options & PR_O_HTTP_MODE) == PR_O_HTTP_TUN)
-                                       curproxy->options &= ~PR_O_HTTP_MODE;
-                               goto out;
-                       }
+                       ha_warning("parsing [%s:%d]: the option '%s' is deprecated and will be removed in next version.\n",
+                                file, linenum, args[1]);
+                       err_code |= ERR_WARN;
+                       goto out;
                }
 
                /* Redispatch can take an integer argument that control when the
index cb3279ae50ad5fb100533df635bc5f9595a6f64b..a58c33d3cfbce41aa556dff0d7d388209bf52a89 100644 (file)
@@ -3611,13 +3611,6 @@ out_uri_auth_compat:
                        newsrv->mux_proto = mux_ent;
                }
 
-               /* 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;
-               }
-
                /* initialize idle conns lists */
                for (newsrv = curproxy->srv; newsrv; newsrv = newsrv->next) {
                        int i;