From: Igor Sysoev Date: Sat, 26 Sep 2009 13:24:15 +0000 (+0000) Subject: fix r3078: do not increase request counter if body has been just discarded X-Git-Tag: release-0.8.17~4 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=63bfeb9bd0c75f54084ff37e2896234c7a18c22d;p=nginx.git fix r3078: do not increase request counter if body has been just discarded --- diff --git a/src/http/ngx_http_request_body.c b/src/http/ngx_http_request_body.c index dc593f10b..bc2a14e0d 100644 --- a/src/http/ngx_http_request_body.c +++ b/src/http/ngx_http_request_body.c @@ -477,8 +477,9 @@ ngx_http_discard_request_body(ngx_http_request_t *r) return NGX_HTTP_INTERNAL_SERVER_ERROR; } - r->count++; - (void) ngx_http_read_discarded_request_body(r); + if (ngx_http_read_discarded_request_body(r) != NGX_OK) { + r->count++; + } return NGX_OK; }