aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_request_body.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/ngx_http_request_body.c')
-rw-r--r--src/http/ngx_http_request_body.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http/ngx_http_request_body.c b/src/http/ngx_http_request_body.c
index fb183c68e..04347c2ce 100644
--- a/src/http/ngx_http_request_body.c
+++ b/src/http/ngx_http_request_body.c
@@ -417,12 +417,12 @@ ngx_http_discard_body(ngx_http_request_t *r)
ngx_del_timer(rev);
}
+ r->discard_body = 1;
+
if (r->headers_in.content_length_n <= 0) {
return NGX_OK;
}
- r->discard_body = 1;
-
size = r->header_in->last - r->header_in->pos;
if (size) {