Welcome! Log In Create A New Profile

Advanced

[nginx] HTTP/2: workaround for clients which fail on table size updates.

Maxim Dounin
August 09, 2018 01:48PM
details: http://hg.nginx.org/nginx/rev/fbb683496705
branches:
changeset: 7335:fbb683496705
user: Maxim Dounin <mdounin@mdounin.ru>
date: Thu Aug 09 20:12:17 2018 +0300
description:
HTTP/2: workaround for clients which fail on table size updates.

There are clients which cannot handle HPACK's dynamic table size updates
as added in 12cadc4669a7 (1.13.6). Notably, old versions of OkHttp library
are known to fail on it (ticket #1397).

This change makes it possible to work with such clients by only sending
dynamic table size updates in response to SETTINGS_HEADER_TABLE_SIZE. As
a downside, clients which do not use SETTINGS_HEADER_TABLE_SIZE will
continue to maintain default 4k table.

diffstat:

src/http/v2/ngx_http_v2.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)

diffs (24 lines):

diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c
--- a/src/http/v2/ngx_http_v2.c
+++ b/src/http/v2/ngx_http_v2.c
@@ -270,8 +270,6 @@ ngx_http_v2_init(ngx_event_t *rev)

h2c->frame_size = NGX_HTTP_V2_DEFAULT_FRAME_SIZE;

- h2c->table_update = 1;
-
h2scf = ngx_http_get_module_srv_conf(hc->conf_ctx, ngx_http_v2_module);

h2c->concurrent_pushes = h2scf->concurrent_pushes;
@@ -2075,6 +2073,11 @@ ngx_http_v2_state_settings_params(ngx_ht
h2c->concurrent_pushes = ngx_min(value, h2scf->concurrent_pushes);
break;

+ case NGX_HTTP_V2_HEADER_TABLE_SIZE_SETTING:
+
+ h2c->table_update = 1;
+ break;
+
default:
break;
}
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] HTTP/2: workaround for clients which fail on table size updates.

Maxim Dounin 446 August 09, 2018 01:48PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 203
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready