comparison src/http/v2/ngx_http_v2.c @ 7023:859d80f57aab

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 <piotrsikora@google.com>
author Piotr Sikora <piotrsikora@google.com>
date Fri, 02 Jun 2017 15:05:24 +0300
parents 645ed7112a01
children 79de0d2aa432
comparison
equal deleted inserted replaced
7022:645ed7112a01 7023:859d80f57aab
1957 h2c->state.length); 1957 h2c->state.length);
1958 1958
1959 return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR); 1959 return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_SIZE_ERROR);
1960 } 1960 }
1961 1961
1962 ngx_http_v2_send_settings(h2c, 1);
1963
1964 return ngx_http_v2_state_settings_params(h2c, pos, end); 1962 return ngx_http_v2_state_settings_params(h2c, pos, end);
1965 } 1963 }
1966 1964
1967 1965
1968 static u_char * 1966 static u_char *
2023 break; 2021 break;
2024 } 2022 }
2025 2023
2026 pos += NGX_HTTP_V2_SETTINGS_PARAM_SIZE; 2024 pos += NGX_HTTP_V2_SETTINGS_PARAM_SIZE;
2027 } 2025 }
2026
2027 ngx_http_v2_send_settings(h2c, 1);
2028 2028
2029 if (window_delta) { 2029 if (window_delta) {
2030 if (ngx_http_v2_adjust_windows(h2c, window_delta) != NGX_OK) { 2030 if (ngx_http_v2_adjust_windows(h2c, window_delta) != NGX_OK) {
2031 return ngx_http_v2_connection_error(h2c, 2031 return ngx_http_v2_connection_error(h2c,
2032 NGX_HTTP_V2_INTERNAL_ERROR); 2032 NGX_HTTP_V2_INTERNAL_ERROR);