diff options
author | Valentin Bartenev <vbart@nginx.com> | 2014-03-26 17:43:39 +0400 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2014-03-26 17:43:39 +0400 |
commit | 042122a066c62cfe0748697d0f16b35fa96409c2 (patch) | |
tree | 356da7a7755eb3b29d76d81b8e67f3f4c2a920a5 /src | |
parent | ac1617915c55923f8281813e91f14997ace1b97e (diff) | |
download | nginx-042122a066c62cfe0748697d0f16b35fa96409c2.tar.gz nginx-042122a066c62cfe0748697d0f16b35fa96409c2.zip |
SPDY: detect premature end of frame while start parsing headers.
Diffstat (limited to 'src')
-rw-r--r-- | src/http/ngx_http_spdy.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/http/ngx_http_spdy.c b/src/http/ngx_http_spdy.c index f6cf2ffba..3231b4673 100644 --- a/src/http/ngx_http_spdy.c +++ b/src/http/ngx_http_spdy.c @@ -1049,6 +1049,15 @@ ngx_http_spdy_state_headers(ngx_http_spdy_connection_t *sc, u_char *pos, if (r->headers_in.headers.part.elts == NULL) { if (buf->last - buf->pos < NGX_SPDY_NV_NUM_SIZE) { + + if (complete) { + ngx_log_error(NGX_LOG_INFO, r->connection->log, 0, + "client sent SYN_STREAM frame " + "with invalid HEADERS block"); + ngx_http_spdy_close_stream(sc->stream, NGX_HTTP_BAD_REQUEST); + return ngx_http_spdy_state_protocol_error(sc); + } + return ngx_http_spdy_state_save(sc, pos, end, ngx_http_spdy_state_headers); } |