diff --git a/include/haproxy/h2.h b/include/haproxy/h2.h index 34ad4de34..1b49b850e 100644 --- a/include/haproxy/h2.h +++ b/include/haproxy/h2.h @@ -157,12 +157,13 @@ enum h2_err { } __attribute__((packed)); // RFC7540 #11.3 : Settings Registry -#define H2_SETTINGS_HEADER_TABLE_SIZE 0x0001 -#define H2_SETTINGS_ENABLE_PUSH 0x0002 -#define H2_SETTINGS_MAX_CONCURRENT_STREAMS 0x0003 -#define H2_SETTINGS_INITIAL_WINDOW_SIZE 0x0004 -#define H2_SETTINGS_MAX_FRAME_SIZE 0x0005 -#define H2_SETTINGS_MAX_HEADER_LIST_SIZE 0x0006 +#define H2_SETTINGS_HEADER_TABLE_SIZE 0x0001 +#define H2_SETTINGS_ENABLE_PUSH 0x0002 +#define H2_SETTINGS_MAX_CONCURRENT_STREAMS 0x0003 +#define H2_SETTINGS_INITIAL_WINDOW_SIZE 0x0004 +#define H2_SETTINGS_MAX_FRAME_SIZE 0x0005 +#define H2_SETTINGS_MAX_HEADER_LIST_SIZE 0x0006 +#define H2_SETTINGS_ENABLE_CONNECT_PROTOCOL 0x0008 /* some protocol constants */ diff --git a/src/mux_h2.c b/src/mux_h2.c index 1fc6ca0b8..b067f2978 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -1593,6 +1593,10 @@ static int h2c_send_settings(struct h2c *h2c) chunk_memcat(&buf, "\x00\x02\x00\x00\x00\x00", 6); } + /* rfc 8441 #3 SETTINGS_ENABLE_CONNECT_PROTOCOL=1 + * sent automatically */ + chunk_memcat(&buf, "\x00\x08\x00\x00\x00\x01", 6); + if (h2_settings_header_table_size != 4096) { char str[6] = "\x00\x01"; /* header_table_size */ @@ -2197,6 +2201,10 @@ static int h2c_handle_settings(struct h2c *h2c) h2c->streams_limit = arg; } break; + case H2_SETTINGS_ENABLE_CONNECT_PROTOCOL: + /* nothing to do here as this settings is automatically + * transmits to the client */ + break; } }