comparison src/http/v2/ngx_http_v2.c @ 7025:7206c3630310

HTTP/2: don't send SETTINGS ACK before already queued DATA frames. Previously, SETTINGS ACK was sent immediately upon receipt of SETTINGS frame, before already queued DATA frames created using old SETTINGS. This incorrect behavior was source of interoperability issues, because peers rely on the fact that new SETTINGS are in effect after receiving SETTINGS ACK. Reported by Feng Li. Signed-off-by: Piotr Sikora <piotrsikora@google.com>
author Piotr Sikora <piotrsikora@google.com>
date Fri, 02 Jun 2017 15:05:32 +0300
parents 79de0d2aa432
children 3c55863e6887
comparison
equal deleted inserted replaced
7024:79de0d2aa432 7025:7206c3630310
2030 NGX_HTTP_V2_ACK_FLAG, 0); 2030 NGX_HTTP_V2_ACK_FLAG, 0);
2031 if (frame == NULL) { 2031 if (frame == NULL) {
2032 return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_INTERNAL_ERROR); 2032 return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_INTERNAL_ERROR);
2033 } 2033 }
2034 2034
2035 ngx_http_v2_queue_blocked_frame(h2c, frame); 2035 ngx_http_v2_queue_ordered_frame(h2c, frame);
2036 2036
2037 if (window_delta) { 2037 if (window_delta) {
2038 if (ngx_http_v2_adjust_windows(h2c, window_delta) != NGX_OK) { 2038 if (ngx_http_v2_adjust_windows(h2c, window_delta) != NGX_OK) {
2039 return ngx_http_v2_connection_error(h2c, 2039 return ngx_http_v2_connection_error(h2c,
2040 NGX_HTTP_V2_INTERNAL_ERROR); 2040 NGX_HTTP_V2_INTERNAL_ERROR);