# HG changeset patch # User Piotr Sikora <piotrsik...@google.com> # Date 1493073310 25200 # Mon Apr 24 15:35:10 2017 -0700 # Node ID a8cfd4c454ff5433629bfd16444c6c71ee932fa1 # Parent 07adf0a7009c3244de4b795c0c06927f4316a87f HTTP/2: send SETTINGS ACK after applying all SETTINGS params.
This avoids sending unnecessary SETTINGS ACK in case of PROTOCOL_ERROR. Signed-off-by: Piotr Sikora <piotrsik...@google.com> diff -r 07adf0a7009c -r a8cfd4c454ff src/http/v2/ngx_http_v2.c --- a/src/http/v2/ngx_http_v2.c +++ b/src/http/v2/ngx_http_v2.c @@ -1972,8 +1972,6 @@ ngx_http_v2_state_settings(ngx_http_v2_c return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR); } - ngx_http_v2_send_settings(h2c, 1); - return ngx_http_v2_state_settings_params(h2c, pos, end); } @@ -2037,6 +2035,8 @@ ngx_http_v2_state_settings_params(ngx_ht pos += NGX_HTTP_V2_SETTINGS_PARAM_SIZE; } + ngx_http_v2_send_settings(h2c, 1); + if (adjustment) { if (ngx_http_v2_adjust_windows(h2c, adjustment) != NGX_OK) { return ngx_http_v2_connection_error(h2c, _______________________________________________ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel