Klaus Demo nginx / f79908a
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. Valentin Bartenev 8 years ago
1 changed file(s) with 2 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
13401340 stream = ngx_http_spdy_get_stream_by_id(sc, sid);
13411341
13421342 if (stream == NULL) {
1343 ngx_log_error(NGX_LOG_INFO, sc->connection->log, 0,
1344 "client sent WINDOW_UPDATE frame "
1345 "for unknown stream %ui", sid);
1346
1347 if (ngx_http_spdy_send_rst_stream(sc, sid, NGX_SPDY_INVALID_STREAM,
1348 NGX_SPDY_LOWEST_PRIORITY)
1349 == NGX_ERROR)
1350 {
1351 return ngx_http_spdy_state_internal_error(sc);
1352 }
1343 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
1344 "unknown spdy stream");
13531345
13541346 return ngx_http_spdy_state_complete(sc, pos, end);
13551347 }