From cc4078f47028d108a95616e3b7257ad8a6eef2b8 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Thu, 18 Oct 2007 11:29:15 +0000 Subject: [PATCH] do not discard body if it has been already read --- src/http/ngx_http_request_body.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http/ngx_http_request_body.c b/src/http/ngx_http_request_body.c index dfe5e0fe1..a9583c706 100644 --- a/src/http/ngx_http_request_body.c +++ b/src/http/ngx_http_request_body.c @@ -442,7 +442,7 @@ ngx_http_discard_request_body(ngx_http_request_t *r) ngx_del_timer(rev); } - if (r->headers_in.content_length_n <= 0) { + if (r->headers_in.content_length_n <= 0 || r->request_body) { return NGX_OK; }