Welcome! Log In Create A New Profile

Advanced

[PATCH] SPDY: added stream-ID checking for SYN_STREAM.

胡军伟(苍茫)
April 14, 2014 05:20AM
# SPDY patch
# User Hu Junwei <junwei.hjw@alibaba-inc.com>
# Date 2014-04-14 11:27:39.304650193 +0800
# Node ID
# Parent
SPDY: added stream-ID checking for SVN_STREAM.

The stream-ID should be checked whether it increases monotonically.

diff -uNr a/src/http/ngx_http_spdy.c b/src/http/ngx_http_spdy.c
--- a/src/http/ngx_http_spdy.c 2014-04-12 10:58:44.444469431 +0800
+++ b/src/http/ngx_http_spdy.c 2014-04-14 11:27:39.304650193 +0800
@@ -940,10 +940,17 @@
sscf = ngx_http_get_module_srv_conf(sc->http_connection->conf_ctx,
ngx_http_spdy_module);

- if (sc->processing >= sscf->concurrent_streams) {
-
- ngx_log_error(NGX_LOG_INFO, sc->connection->log, 0,
- "spdy concurrent streams excessed %ui",
sc->processing);
+ if ((sid <= sc->last_sid) || (sc->processing >=
sscf->concurrent_streams)) {
+ if (sid <= sc->last_sid) {
+ ngx_log_error(NGX_LOG_INFO, sc->connection->log, 0,
+ "spdy stream-ID does not increase monotonically.
"
+ "(last=%ui, this=%ui)",
+ sc->last_sid, sid);
+ } else {
+ ngx_log_error(NGX_LOG_INFO, sc->connection->log, 0,
+ "spdy concurrent streams excessed %ui",
+ sc->processing);
+ }

if (ngx_http_spdy_send_rst_stream(sc, sid, NGX_SPDY_REFUSED_STREAM,
prio)

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

[PATCH] SPDY: added stream-ID checking for SYN_STREAM.

胡军伟(苍茫) 699 April 14, 2014 05:20AM

Re: [PATCH] SPDY: added stream-ID checking for SYN_STREAM.

Valentin V. Bartenev 333 April 14, 2014 06:02AM



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

Online Users

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