]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: h2: advertise to servers that we don't support push
authorWilly Tarreau <w@1wt.eu>
Tue, 26 Feb 2019 15:01:52 +0000 (16:01 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 26 Feb 2019 15:07:27 +0000 (16:07 +0100)
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

index 5ae2297a047e8a3674201776ae7c72391f45456f..ebd4fe83837ab7a53402e1224abf760b13d59b7b 100644 (file)
@@ -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 */