diff options
author | Valentin Bartenev <vbart@nginx.com> | 2016-04-19 17:38:49 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2016-04-19 17:38:49 +0300 |
commit | 7458f6667530aef24272e5b5dc8815c27b35b05f (patch) | |
tree | 7a5cdb4395932d8f84af4c88092def8b4fb4e2d6 | |
parent | f4df08b19d5e2e9f5454b3850a0c01bc4f356125 (diff) | |
download | nginx-7458f6667530aef24272e5b5dc8815c27b35b05f.tar.gz |
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.
-rw-r--r-- | src/http/v2/ngx_http_v2.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c index 421cfa03a..dd712c121 100644 --- a/src/http/v2/ngx_http_v2.c +++ b/src/http/v2/ngx_http_v2.c @@ -3473,6 +3473,7 @@ ngx_http_v2_read_request_body(ngx_http_request_t *r, } if (rb->buf == NULL) { + stream->skip_data = 1; return NGX_HTTP_INTERNAL_SERVER_ERROR; } @@ -3494,6 +3495,7 @@ ngx_http_v2_read_request_body(ngx_http_request_t *r, stream->recv_window) == NGX_ERROR) { + stream->skip_data = 1; return NGX_HTTP_INTERNAL_SERVER_ERROR; } } |