Welcome! Log In Create A New Profile

Advanced

[nginx] SPDY: Stream-ID restrictions according to specification.

Valentin Bartenev
April 21, 2014 11:24AM
details: http://hg.nginx.org/nginx/rev/de93bbe2d8cd
branches:
changeset: 5664:de93bbe2d8cd
user: Valentin Bartenev <vbart@nginx.com>
date: Mon Apr 21 18:59:53 2014 +0400
description:
SPDY: Stream-ID restrictions according to specification.

diffstat:

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

diffs (40 lines):

diff -r 001beb963d86 -r de93bbe2d8cd src/http/ngx_http_spdy.c
--- a/src/http/ngx_http_spdy.c Mon Apr 21 13:48:41 2014 +0400
+++ b/src/http/ngx_http_spdy.c Mon Apr 21 18:59:53 2014 +0400
@@ -937,6 +937,27 @@ ngx_http_spdy_state_syn_stream(ngx_http_
ngx_log_debug2(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
"spdy SYN_STREAM frame sid:%ui prio:%ui", sid, prio);

+ if (sid % 2 == 0 || sid <= sc->last_sid) {
+ ngx_log_error(NGX_LOG_INFO, sc->connection->log, 0,
+ "client sent SYN_STREAM frame "
+ "with invalid Stream-ID %ui", sid);
+
+ stream = ngx_http_spdy_get_stream_by_id(sc, sid);
+
+ if (stream) {
+ if (ngx_http_spdy_terminate_stream(sc, stream,
+ NGX_SPDY_PROTOCOL_ERROR)
+ != NGX_OK)
+ {
+ return ngx_http_spdy_state_internal_error(sc);
+ }
+ }
+
+ return ngx_http_spdy_state_protocol_error(sc);
+ }
+
+ sc->last_sid = sid;
+
sscf = ngx_http_get_module_srv_conf(sc->http_connection->conf_ctx,
ngx_http_spdy_module);

@@ -968,8 +989,6 @@ ngx_http_spdy_state_syn_stream(ngx_http_

sc->stream = stream;

- sc->last_sid = sid;
-
return ngx_http_spdy_state_headers(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: Stream-ID restrictions according to specification.

Valentin Bartenev 591 April 21, 2014 11:24AM



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

Online Users

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