diff options
| author | Valentin Bartenev <vbart@nginx.com> | 2014-04-07 19:27:56 +0400 |
|---|---|---|
| committer | Valentin Bartenev <vbart@nginx.com> | 2014-04-07 19:27:56 +0400 |
| commit | b2cd52067348aad0f751e654ed7f42f0a29b418d (patch) | |
| tree | 711ebee77bf43f42cd94b87108effbe74f96c4cb /src | |
| parent | 55bef3047488310e0c8474afa5158190d8040576 (diff) | |
| download | nginx-b2cd52067348aad0f751e654ed7f42f0a29b418d.tar.gz nginx-b2cd52067348aad0f751e654ed7f42f0a29b418d.tar.bz2 | |
SPDY: better detect premature closing of stream.
Following a24f88eff684, now the case when the FIN flag is set in SYN_STREAM
is also covered.
Diffstat (limited to '')
| -rw-r--r-- | src/http/ngx_http_spdy.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/http/ngx_http_spdy.c b/src/http/ngx_http_spdy.c index 92f2a00c6..d821475d2 100644 --- a/src/http/ngx_http_spdy.c +++ b/src/http/ngx_http_spdy.c @@ -2962,6 +2962,16 @@ ngx_http_spdy_run_request(ngx_http_request_t *r) return; } + if (r->headers_in.content_length_n > 0 && r->spdy_stream->in_closed) { + ngx_log_error(NGX_LOG_INFO, r->connection->log, 0, + "client prematurely closed stream"); + + r->spdy_stream->skip_data = NGX_SPDY_DATA_ERROR; + + ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST); + return; + } + ngx_http_process_request(r); } |
