From da173abde0afa26b02c778d6475462ed487594c5 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Wed, 30 Aug 2006 10:39:17 +0000 Subject: nginx-0.4.0-RELEASE import *) Change in internal API: the HTTP modules initialization was moved from the init module phase to the HTTP postconfiguration phase. *) Change: now the request body is not read beforehand for the ngx_http_perl_module: it's required to start the reading using the $r->has_request_body method. *) Feature: the ngx_http_perl_module supports the DECLINED return code. *) Feature: the ngx_http_dav_module supports the incoming "Date" header line for the PUT method. *) Feature: the "ssi" directive is available inside the "if" block. *) Bugfix: a segmentation fault occurred if there was an "index" directive with variables and the first index name was without variables; the bug had appeared in 0.1.29. --- src/http/ngx_http_request_body.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/http/ngx_http_request_body.c') 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) { -- cgit