Mercurial > hg > nginx
comparison src/http/v2/ngx_http_v2.c @ 6519:9ac934dd5dd8
HTTP/2: skip data frames in case of internal errors.
This prevents possible processing of such frames and triggering
rb->post_handler if an error occurred during r->request_body
initialization.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Tue, 19 Apr 2016 17:38:49 +0300 |
parents | 7760b54d5458 |
children | 9070ba416284 |
comparison
equal
deleted
inserted
replaced
6518:7760b54d5458 | 6519:9ac934dd5dd8 |
---|---|
3471 rb->buf->sync = 1; | 3471 rb->buf->sync = 1; |
3472 } | 3472 } |
3473 } | 3473 } |
3474 | 3474 |
3475 if (rb->buf == NULL) { | 3475 if (rb->buf == NULL) { |
3476 stream->skip_data = 1; | |
3476 return NGX_HTTP_INTERNAL_SERVER_ERROR; | 3477 return NGX_HTTP_INTERNAL_SERVER_ERROR; |
3477 } | 3478 } |
3478 | 3479 |
3479 if (stream->in_closed) { | 3480 if (stream->in_closed) { |
3480 r->request_body_no_buffering = 0; | 3481 r->request_body_no_buffering = 0; |
3492 | 3493 |
3493 if (ngx_http_v2_send_window_update(stream->connection, stream->node->id, | 3494 if (ngx_http_v2_send_window_update(stream->connection, stream->node->id, |
3494 stream->recv_window) | 3495 stream->recv_window) |
3495 == NGX_ERROR) | 3496 == NGX_ERROR) |
3496 { | 3497 { |
3498 stream->skip_data = 1; | |
3497 return NGX_HTTP_INTERNAL_SERVER_ERROR; | 3499 return NGX_HTTP_INTERNAL_SERVER_ERROR; |
3498 } | 3500 } |
3499 } | 3501 } |
3500 | 3502 |
3501 ngx_add_timer(r->connection->read, clcf->client_body_timeout); | 3503 ngx_add_timer(r->connection->read, clcf->client_body_timeout); |