changeset 3166:b208e383657d

fix r3078: do not increase request counter if body has been just discarded
author Igor Sysoev <igor@sysoev.ru>
date Sat, 26 Sep 2009 13:24:15 +0000
parents 7658e9c7e814
children 7d1f9a449603
files src/http/ngx_http_request_body.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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;
 }