Welcome! Log In Create A New Profile

Advanced

[nginx] SPDY: avoid sending RST_STREAM on WINDOW_UPDATE with unk...

Valentin Bartenev
April 21, 2014 11:24AM
details: http://hg.nginx.org/nginx/rev/46d0795a846c
branches:
changeset: 5665:46d0795a846c
user: Valentin Bartenev <vbart@nginx.com>
date: Mon Apr 21 19:21:17 2014 +0400
description:
SPDY: avoid sending RST_STREAM on WINDOW_UPDATE with unknown SID.

There's a race condition between closing a stream by one endpoint
and sending a WINDOW_UPDATE frame by another. So it would be better
to just skip such frames for unknown streams, like is already done
for the DATA frames.

diffstat:

src/http/ngx_http_spdy.c | 12 ++----------
1 files changed, 2 insertions(+), 10 deletions(-)

diffs (22 lines):

diff -r de93bbe2d8cd -r 46d0795a846c src/http/ngx_http_spdy.c
--- a/src/http/ngx_http_spdy.c Mon Apr 21 18:59:53 2014 +0400
+++ b/src/http/ngx_http_spdy.c Mon Apr 21 19:21:17 2014 +0400
@@ -1341,16 +1341,8 @@ ngx_http_spdy_state_window_update(ngx_ht
stream = ngx_http_spdy_get_stream_by_id(sc, sid);

if (stream == NULL) {
- ngx_log_error(NGX_LOG_INFO, sc->connection->log, 0,
- "client sent WINDOW_UPDATE frame "
- "for unknown stream %ui", sid);
-
- if (ngx_http_spdy_send_rst_stream(sc, sid, NGX_SPDY_INVALID_STREAM,
- NGX_SPDY_LOWEST_PRIORITY)
- == NGX_ERROR)
- {
- return ngx_http_spdy_state_internal_error(sc);
- }
+ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
+ "unknown spdy stream");

return ngx_http_spdy_state_complete(sc, pos, end);
}

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

[nginx] SPDY: avoid sending RST_STREAM on WINDOW_UPDATE with unk...

Valentin Bartenev 798 April 21, 2014 11:24AM



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

Online Users

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