diff src/http/ngx_http_request_body.c @ 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 9140fbb2ab83
children 74b74513ed59
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;
 }