Mercurial > hg > nginx-quic
comparison src/http/ngx_http_spdy.c @ 5625:372cc6e532a6
SPDY: detect premature end of frame while start parsing headers.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Wed, 26 Mar 2014 17:43:39 +0400 |
parents | c15350f4071c |
children | 2411d4b5be2c |
comparison
equal
deleted
inserted
replaced
5624:bd91f286ee0a | 5625:372cc6e532a6 |
---|---|
1047 buf->last = sc->zstream_in.next_out; | 1047 buf->last = sc->zstream_in.next_out; |
1048 | 1048 |
1049 if (r->headers_in.headers.part.elts == NULL) { | 1049 if (r->headers_in.headers.part.elts == NULL) { |
1050 | 1050 |
1051 if (buf->last - buf->pos < NGX_SPDY_NV_NUM_SIZE) { | 1051 if (buf->last - buf->pos < NGX_SPDY_NV_NUM_SIZE) { |
1052 | |
1053 if (complete) { | |
1054 ngx_log_error(NGX_LOG_INFO, r->connection->log, 0, | |
1055 "client sent SYN_STREAM frame " | |
1056 "with invalid HEADERS block"); | |
1057 ngx_http_spdy_close_stream(sc->stream, NGX_HTTP_BAD_REQUEST); | |
1058 return ngx_http_spdy_state_protocol_error(sc); | |
1059 } | |
1060 | |
1052 return ngx_http_spdy_state_save(sc, pos, end, | 1061 return ngx_http_spdy_state_save(sc, pos, end, |
1053 ngx_http_spdy_state_headers); | 1062 ngx_http_spdy_state_headers); |
1054 } | 1063 } |
1055 | 1064 |
1056 sc->entries = ngx_spdy_frame_parse_uint32(buf->pos); | 1065 sc->entries = ngx_spdy_frame_parse_uint32(buf->pos); |