]> git.kaiwu.me - nginx.git/commitdiff
fix r3078: do not increase request counter if body has been just discarded
authorIgor Sysoev <igor@sysoev.ru>
Sat, 26 Sep 2009 13:24:15 +0000 (13:24 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Sat, 26 Sep 2009 13:24:15 +0000 (13:24 +0000)
src/http/ngx_http_request_body.c

index dc593f10b308b8b3c228b16660ece7805f3c23da..bc2a14e0dcc2fa6bddb4187ff6027e486fd5957a 100644 (file)
@@ -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;
 }