From d808b37656fc74b5184f2c9f53b6fbc3ea777451 Mon Sep 17 00:00:00 2001 From: Hakase Date: Fri, 6 Sep 2019 08:41:03 +0900 Subject: [PATCH] Latest update - 7563 --- src/http/ngx_http_core_module.c | 6 ++++-- src/http/ngx_http_parse.c | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index cbc5b03..89f1bca 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -1674,8 +1674,10 @@ ngx_http_send_response(ngx_http_request_t *r, ngx_uint_t status, ngx_buf_t *b; ngx_chain_t out; - if (ngx_http_discard_request_body(r) != NGX_OK) { - return NGX_HTTP_INTERNAL_SERVER_ERROR; + rc = ngx_http_discard_request_body(r); + + if (rc != NGX_OK) { + return rc; } r->headers_out.status = status; diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c index d9a1dbe..8e1b118 100644 --- a/src/http/ngx_http_parse.c +++ b/src/http/ngx_http_parse.c @@ -2268,6 +2268,9 @@ ngx_http_parse_chunked(ngx_http_request_t *r, ngx_buf_t *b, break; case LF: state = sw_chunk_start; + break; + default: + goto invalid; } break;