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.
This commit is contained in:
Willy Tarreau 2019-02-26 16:01:52 +01:00
parent 02e771a9e0
commit 0bbad6bb06

View File

@ -1026,6 +1026,11 @@ static int h2c_send_settings(struct h2c *h2c)
"\x00\x00\x00\x00", /* stream ID : 0 */ "\x00\x00\x00\x00", /* stream ID : 0 */
9); 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) { if (h2_settings_header_table_size != 4096) {
char str[6] = "\x00\x01"; /* header_table_size */ char str[6] = "\x00\x01"; /* header_table_size */