comparison src/http/v2/ngx_http_v2.c @ 7100:12cadc4669a7

HTTP/2: signal 0-byte HPACK's dynamic table size. This change lets NGINX talk to clients with SETTINGS_HEADER_TABLE_SIZE smaller than the default 4KB. Previously, NGINX would ACK the SETTINGS frame with a small dynamic table size, but it would never send dynamic table size update, leading to a connection-level COMPRESSION_ERROR. Also, it allows clients to release 4KB of memory per connection, since NGINX doesn't use HPACK's dynamic table when encoding headers, however clients had to maintain it, since NGINX never signaled that it doesn't use it. Signed-off-by: Piotr Sikora <piotrsikora@google.com>
author Piotr Sikora <piotrsikora@google.com>
date Wed, 30 Aug 2017 14:52:11 -0700
parents 3c55863e6887
children d77407baccd1
comparison
equal deleted inserted replaced
7099:019b91bd21cc 7100:12cadc4669a7
243 243
244 h2c->init_window = NGX_HTTP_V2_DEFAULT_WINDOW; 244 h2c->init_window = NGX_HTTP_V2_DEFAULT_WINDOW;
245 245
246 h2c->frame_size = NGX_HTTP_V2_DEFAULT_FRAME_SIZE; 246 h2c->frame_size = NGX_HTTP_V2_DEFAULT_FRAME_SIZE;
247 247
248 h2c->table_update = 1;
249
248 h2scf = ngx_http_get_module_srv_conf(hc->conf_ctx, ngx_http_v2_module); 250 h2scf = ngx_http_get_module_srv_conf(hc->conf_ctx, ngx_http_v2_module);
249 251
250 h2c->pool = ngx_create_pool(h2scf->pool_size, h2c->connection->log); 252 h2c->pool = ngx_create_pool(h2scf->pool_size, h2c->connection->log);
251 if (h2c->pool == NULL) { 253 if (h2c->pool == NULL) {
252 ngx_http_close_connection(c); 254 ngx_http_close_connection(c);