Welcome! Log In Create A New Profile

Advanced

[PATCH 4 of 4] HTTP/2: don't send SETTINGS ACK before already queued DATA frames

Piotr Sikora via nginx-devel
April 24, 2017 06:50PM
# HG changeset patch
# User Piotr Sikora <piotrsikora@google.com>
# Date 1493073310 25200
# Mon Apr 24 15:35:10 2017 -0700
# Node ID 3624fa075acac110a08c0f1c928c545a58c5801f
# Parent b8d7f4a4d5abb4a27a772910358e263d49c618ef
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>

diff -r b8d7f4a4d5ab -r 3624fa075aca src/http/v2/ngx_http_v2.c
--- a/src/http/v2/ngx_http_v2.c
+++ b/src/http/v2/ngx_http_v2.c
@@ -2043,7 +2043,7 @@ ngx_http_v2_state_settings_params(ngx_ht
return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_INTERNAL_ERROR);
}

- ngx_http_v2_queue_blocked_frame(h2c, frame);
+ ngx_http_v2_queue_ordered_frame(h2c, frame);

if (adjustment) {
if (ngx_http_v2_adjust_windows(h2c, adjustment) != NGX_OK) {
diff -r b8d7f4a4d5ab -r 3624fa075aca src/http/v2/ngx_http_v2.h
--- a/src/http/v2/ngx_http_v2.h
+++ b/src/http/v2/ngx_http_v2.h
@@ -261,6 +261,15 @@ ngx_http_v2_queue_blocked_frame(ngx_http
}


+static ngx_inline void
+ngx_http_v2_queue_ordered_frame(ngx_http_v2_connection_t *h2c,
+ ngx_http_v2_out_frame_t *frame)
+{
+ frame->next = h2c->last_out;
+ h2c->last_out = frame;
+}
+
+
void ngx_http_v2_init(ngx_event_t *rev);
void ngx_http_v2_request_headers_init(void);

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH 1 of 4] HTTP/2: emit new frames only after applying all SETTINGS params

Piotr Sikora via nginx-devel 497 April 24, 2017 06:50PM

[PATCH 3 of 4] HTTP/2: make SETTINGS ACK frame reusable

Piotr Sikora via nginx-devel 232 April 24, 2017 06:50PM

Re: [PATCH 3 of 4] HTTP/2: make SETTINGS ACK frame reusable

Valentin V. Bartenev 167 June 01, 2017 01:54PM

[PATCH 2 of 4] HTTP/2: send SETTINGS ACK after applying all SETTINGS params

Piotr Sikora via nginx-devel 261 April 24, 2017 06:50PM

Re: [PATCH 2 of 4] HTTP/2: send SETTINGS ACK after applying all SETTINGS params

Valentin V. Bartenev 193 June 01, 2017 01:24PM

[PATCH 4 of 4] HTTP/2: don't send SETTINGS ACK before already queued DATA frames

Piotr Sikora via nginx-devel 231 April 24, 2017 06:50PM

Re: [PATCH 4 of 4] HTTP/2: don't send SETTINGS ACK before already queued DATA frames

Valentin V. Bartenev 233 June 01, 2017 01:54PM

Re: [PATCH 1 of 4] HTTP/2: emit new frames only after applying all SETTINGS params

Piotr Sikora via nginx-devel 237 May 30, 2017 05:24PM

Re: [PATCH 1 of 4] HTTP/2: emit new frames only after applying all SETTINGS params

Valentin V. Bartenev 189 June 01, 2017 10:50AM

Re: [PATCH 1 of 4] HTTP/2: emit new frames only after applying all SETTINGS params

Valentin V. Bartenev 190 June 01, 2017 01:56PM

Re: [PATCH 1 of 4] HTTP/2: emit new frames only after applying all SETTINGS params

Piotr Sikora via nginx-devel 189 June 01, 2017 05:56PM

Re: [PATCH 1 of 4] HTTP/2: emit new frames only after applying all SETTINGS params

Valentin V. Bartenev 349 June 02, 2017 08:12AM

[PATCH 1 of 4] HTTP/2: emit new frames only after applying all SETTINGS params

Piotr Sikora via nginx-devel 208 June 01, 2017 05:54PM

[PATCH 2 of 4] HTTP/2: send SETTINGS ACK after applying all SETTINGS params

Piotr Sikora via nginx-devel 214 June 01, 2017 05:54PM

[PATCH 3 of 4] HTTP/2: make SETTINGS ACK frame reusable

Piotr Sikora via nginx-devel 244 June 01, 2017 05:54PM

[PATCH 4 of 4] HTTP/2: don't send SETTINGS ACK before already queued DATA frames

Piotr Sikora via nginx-devel 197 June 01, 2017 05:54PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 246
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready