HTTP/2: handle duplicate INITIAL_WINDOW_SIZE settings.

This commit is contained in:
Ruslan Ermilov 2018-01-29 15:54:36 +03:00
parent 63a4dab7b0
commit 34cf5d5e6a

View File

@ -2000,8 +2000,6 @@ ngx_http_v2_state_settings_params(ngx_http_v2_connection_t *h2c, u_char *pos,
} }
window_delta = value - h2c->init_window; window_delta = value - h2c->init_window;
h2c->init_window = value;
break; break;
case NGX_HTTP_V2_MAX_FRAME_SIZE_SETTING: case NGX_HTTP_V2_MAX_FRAME_SIZE_SETTING:
@ -2037,6 +2035,8 @@ ngx_http_v2_state_settings_params(ngx_http_v2_connection_t *h2c, u_char *pos,
ngx_http_v2_queue_ordered_frame(h2c, frame); ngx_http_v2_queue_ordered_frame(h2c, frame);
if (window_delta) { if (window_delta) {
h2c->init_window += window_delta;
if (ngx_http_v2_adjust_windows(h2c, window_delta) != NGX_OK) { if (ngx_http_v2_adjust_windows(h2c, window_delta) != NGX_OK) {
return ngx_http_v2_connection_error(h2c, return ngx_http_v2_connection_error(h2c,
NGX_HTTP_V2_INTERNAL_ERROR); NGX_HTTP_V2_INTERNAL_ERROR);