]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux-h2: mention that the mux is compatible with both sides
authorWilly Tarreau <w@1wt.eu>
Wed, 3 Oct 2018 08:25:20 +0000 (10:25 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 2 Dec 2018 12:31:03 +0000 (13:31 +0100)
We declare two configurations for the H2 mux. One supporting only
the frontend in HTTP mode and one supporting both sides in HTX mode.

This is only to ease development at this point. Trying to assign an h2
mux on the server side will still fail during h2_init() anyway instead
of at config parsing time.

src/mux_h2.c

index bab4c851df5fbf6894441c755ff8edf2b625f13b..dd74002ef558b999f15aba717bb3098dfa0d82b8 100644 (file)
@@ -4369,10 +4369,15 @@ static const struct mux_ops h2_ops = {
 
 /* PROTO selection : this mux registers PROTO token "h2" */
 static struct mux_proto_list mux_proto_h2 =
-       { .token = IST("h2"), .mode = PROTO_MODE_HTTP | PROTO_MODE_HTX, .side = PROTO_SIDE_FE, .mux = &h2_ops };
+       { .token = IST("h2"), .mode = PROTO_MODE_HTTP, .side = PROTO_SIDE_FE, .mux = &h2_ops };
 
 INITCALL1(STG_REGISTER, register_mux_proto, &mux_proto_h2);
 
+static struct mux_proto_list mux_proto_h2_htx =
+       { .token = IST("h2"), .mode = PROTO_MODE_HTX, .side = PROTO_SIDE_BOTH, .mux = &h2_ops };
+
+INITCALL1(STG_REGISTER, register_mux_proto, &mux_proto_h2_htx);
+
 /* config keyword parsers */
 static struct cfg_kw_list cfg_kws = {ILH, {
        { CFG_GLOBAL, "tune.h2.header-table-size",      h2_parse_header_table_size      },