Welcome! Log In Create A New Profile

Advanced

[nginx] HTTP/2: switched back to RST_STREAM with NO_ERROR.

Maxim Dounin
September 18, 2019 02:44PM
details: https://hg.nginx.org/nginx/rev/2e61e4b6bcd9
branches:
changeset: 7568:2e61e4b6bcd9
user: Maxim Dounin <mdounin@mdounin.ru>
date: Wed Sep 18 20:28:09 2019 +0300
description:
HTTP/2: switched back to RST_STREAM with NO_ERROR.

In 8df664ebe037, we've switched to maximizing stream window instead
of sending RST_STREAM. Since then handling of RST_STREAM with NO_ERROR
was fixed at least in Chrome, hence we switch back to using RST_STREAM.

This allows more effective rejecting of large bodies, and also minimizes
non-payload traffic to be accounted in the next patch.

diffstat:

src/http/v2/ngx_http_v2.c | 22 ----------------------
1 files changed, 0 insertions(+), 22 deletions(-)

diffs (37 lines):

diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c
--- a/src/http/v2/ngx_http_v2.c
+++ b/src/http/v2/ngx_http_v2.c
@@ -4284,33 +4284,11 @@ ngx_http_v2_close_stream(ngx_http_v2_str
}

} else if (!stream->in_closed) {
-#if 0
if (ngx_http_v2_send_rst_stream(h2c, node->id, NGX_HTTP_V2_NO_ERROR)
!= NGX_OK)
{
h2c->connection->error = 1;
}
-#else
- /*
- * At the time of writing at least the latest versions of Chrome
- * do not properly handle RST_STREAM with NO_ERROR status.
- *
- * See: https://bugs.chromium.org/p/chromium/issues/detail?id=603182
- *
- * As a workaround, the stream window is maximized before closing
- * the stream. This allows a client to send up to 2 GB of data
- * before getting blocked on flow control.
- */
-
- if (stream->recv_window < NGX_HTTP_V2_MAX_WINDOW
- && ngx_http_v2_send_window_update(h2c, node->id,
- NGX_HTTP_V2_MAX_WINDOW
- - stream->recv_window)
- != NGX_OK)
- {
- h2c->connection->error = 1;
- }
-#endif
}
}

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

[nginx] HTTP/2: switched back to RST_STREAM with NO_ERROR.

Maxim Dounin 216 September 18, 2019 02:44PM



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

Online Users

Guests: 267
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