From 0bbad6bb06f39185a1b6803e354dac1a48be6c16 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 26 Feb 2019 16:01:52 +0100 Subject: [PATCH] BUG/MEDIUM: h2: advertise to servers that we don't support push The h2c_send_settings() function was initially made to serve on the frontend. Here we don't need to advertise that we don't support PUSH since we don't do that ourselves. But on the backend side it's different because PUSH is enabled by default so we must announce that we don't want the server to use it. This must be backported to 1.9. --- src/mux_h2.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mux_h2.c b/src/mux_h2.c index 5ae2297a0..ebd4fe838 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -1026,6 +1026,11 @@ static int h2c_send_settings(struct h2c *h2c) "\x00\x00\x00\x00", /* stream ID : 0 */ 9); + if (h2c->flags & H2_CF_IS_BACK) { + /* send settings_enable_push=0 */ + chunk_memcat(&buf, "\x00\x02\x00\x00\x00\x00", 6); + } + if (h2_settings_header_table_size != 4096) { char str[6] = "\x00\x01"; /* header_table_size */