]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: connection: Remove the multiplexer protocol PROTO_MODE_HTX
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 15 Jul 2019 09:42:52 +0000 (11:42 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 19 Jul 2019 07:18:27 +0000 (09:18 +0200)
Since the legacy HTTP mode is disabled and no multiplexer relies on it anymore,
there is no reason to have 2 multiplexer protocols for the HTTP. So the protocol
PROTO_MODE_HTX was removed and all HTTP multiplexers use now PROTO_MODE_HTTP.

include/proto/connection.h
include/types/connection.h
src/cfgparse.c
src/mux_h1.c
src/mux_h2.c
src/proxy.c

index 02f3234a8b99ecd00315285e51c1e431f4519871..9b4ac51d335a4f48e1ecb231fb3e34efeec58cf5 100644 (file)
@@ -929,10 +929,6 @@ static inline void list_mux_proto(FILE *out)
                        mode = "TCP";
                else if (item->mode == PROTO_MODE_HTTP)
                        mode = "HTTP";
-               else if (item->mode == PROTO_MODE_HTX)
-                       mode = "HTX";
-               else if (item->mode == (PROTO_MODE_HTTP | PROTO_MODE_HTX))
-                       mode = "HTTP|HTX";
                else
                        mode = "NONE";
 
@@ -1043,7 +1039,7 @@ static inline int conn_install_mux_fe(struct connection *conn, void *ctx)
                int mode;
 
                if (bind_conf->frontend->mode == PR_MODE_HTTP)
-                       mode = ((bind_conf->frontend->options2 & PR_O2_USE_HTX) ? PROTO_MODE_HTX : PROTO_MODE_HTTP);
+                       mode = PROTO_MODE_HTTP;
                else
                        mode = PROTO_MODE_TCP;
 
@@ -1081,7 +1077,7 @@ static inline int conn_install_mux_be(struct connection *conn, void *ctx, struct
                int mode;
 
                if (prx->mode == PR_MODE_HTTP)
-                       mode = ((prx->options2 & PR_O2_USE_HTX) ? PROTO_MODE_HTX : PROTO_MODE_HTTP);
+                       mode = PROTO_MODE_HTTP;
                else
                        mode = PROTO_MODE_TCP;
 
index cc2fb17b473524411da148935c0629586f730a53..6609f8b3d7bb3a6dde51da47e436183769fe848b 100644 (file)
@@ -471,8 +471,7 @@ enum proto_proxy_mode {
        PROTO_MODE_NONE = 0,
        PROTO_MODE_TCP  = 1 << 0, // must not be changed!
        PROTO_MODE_HTTP = 1 << 1, // must not be changed!
-       PROTO_MODE_HTX  = 1 << 2, // must not be changed!
-       PROTO_MODE_ANY  = PROTO_MODE_TCP | PROTO_MODE_HTTP, // note: HTX is experimental and must not appear here
+       PROTO_MODE_ANY  = PROTO_MODE_TCP | PROTO_MODE_HTTP,
 };
 
 enum proto_proxy_side {
index 1101470be9b355d91a6d48b4fe522e126644ba19..9bfe8745059fa7229337245746660655e083ecbf 100644 (file)
@@ -3585,10 +3585,6 @@ out_uri_auth_compat:
                        int mode = (1 << (curproxy->mode == PR_MODE_HTTP));
                        const struct mux_proto_list *mux_ent;
 
-                       /* Special case for HTX because legacy HTTP still exists */
-                       if (mode == PROTO_MODE_HTTP && (curproxy->options2 & PR_O2_USE_HTX))
-                               mode = PROTO_MODE_HTX;
-
                        if (!bind_conf->mux_proto)
                                continue;
 
@@ -3614,10 +3610,6 @@ out_uri_auth_compat:
                        int mode = (1 << (curproxy->mode == PR_MODE_HTTP));
                        const struct mux_proto_list *mux_ent;
 
-                       /* Special case for HTX because legacy HTTP still exists */
-                       if (mode == PROTO_MODE_HTTP && (curproxy->options2 & PR_O2_USE_HTX))
-                               mode = PROTO_MODE_HTX;
-
                        if (!newsrv->mux_proto)
                                continue;
 
index 009afb09a13e5bf68cbb0866493152ec721ce02f..099cd223521ecdb4bffeb021d8f23e11341e317b 100644 (file)
@@ -479,7 +479,7 @@ static void h1_release(struct h1c *h1c)
                        if (h1c->wait_event.events)
                                conn->xprt->unsubscribe(conn, conn->xprt_ctx,
                                    h1c->wait_event.events, &h1c->wait_event);
-                       if (conn_upgrade_mux_fe(conn, NULL, &h1c->ibuf, ist("h2"), PROTO_MODE_HTX) != -1) {
+                       if (conn_upgrade_mux_fe(conn, NULL, &h1c->ibuf, ist("h2"), PROTO_MODE_HTTP) != -1) {
                                /* connection successfully upgraded to H2, this
                                 * mux was already released */
                                return;
@@ -2533,7 +2533,7 @@ static const struct mux_ops mux_h1_ops = {
 
 /* this mux registers default HTX proto */
 static struct mux_proto_list mux_proto_htx =
-{ .token = IST(""), .mode = PROTO_MODE_HTX, .side = PROTO_SIDE_BOTH, .mux = &mux_h1_ops };
+{ .token = IST(""), .mode = PROTO_MODE_HTTP, .side = PROTO_SIDE_BOTH, .mux = &mux_h1_ops };
 
 INITCALL1(STG_REGISTER, register_mux_proto, &mux_proto_htx);
 
index 271d19a551526b64e28a876a058fe8582eb6067f..10bad14f2e456bfded58cfb6126ad9edd04851be 100644 (file)
@@ -5163,7 +5163,7 @@ static const struct mux_ops h2_ops = {
 };
 
 static struct mux_proto_list mux_proto_h2 =
-       { .token = IST("h2"), .mode = PROTO_MODE_HTX, .side = PROTO_SIDE_BOTH, .mux = &h2_ops };
+       { .token = IST("h2"), .mode = PROTO_MODE_HTTP, .side = PROTO_SIDE_BOTH, .mux = &h2_ops };
 
 INITCALL1(STG_REGISTER, register_mux_proto, &mux_proto_h2);
 
index 57efc389bb97df28860b3fcbd3f92e3a0da409ed..518ee3543c9928da4aa8c7360d2f0872a02f6e68 100644 (file)
@@ -1477,7 +1477,7 @@ int stream_set_backend(struct stream *s, struct proxy *be)
                                if (s->si[0].wait_event.events)
                                        conn->mux->unsubscribe(cs, s->si[0].wait_event.events,
                                            &s->si[0].wait_event);
-                               if (conn_upgrade_mux_fe(conn, cs, &s->req.buf, ist(""), PROTO_MODE_HTX)  == -1)
+                               if (conn_upgrade_mux_fe(conn, cs, &s->req.buf, ist(""), PROTO_MODE_HTTP)  == -1)
                                        return 0;
                                s->flags |= SF_HTX;
                        }