diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/http/ngx_http_core_module.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 5a015ea33..aa03fd617 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -1660,8 +1660,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; |