# HG changeset patch # User Igor Sysoev # Date 1253971455 0 # Node ID b208e383657dd9526d060462c8f32cbeab169eae # Parent 7658e9c7e81403d77cdf8cc8041a5dafe547ccac 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 --- 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_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; }