]> git.kaiwu.me - nginx.git/commitdiff
update r3167: do not set r->discard_body if the body has been just discarded
authorIgor Sysoev <igor@sysoev.ru>
Fri, 2 Oct 2009 09:46:04 +0000 (09:46 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Fri, 2 Oct 2009 09:46:04 +0000 (09:46 +0000)
src/http/ngx_http_request_body.c

index bc2a14e0dcc2fa6bddb4187ff6027e486fd5957a..83e2d015bc45658e7f81c57da06eb6588354f09e 100644 (file)
@@ -469,8 +469,6 @@ ngx_http_discard_request_body(ngx_http_request_t *r)
         }
     }
 
-    r->discard_body = 1;
-
     r->read_event_handler = ngx_http_read_discarded_request_body_handler;
 
     if (ngx_handle_read_event(rev, 0) != NGX_OK) {
@@ -479,6 +477,7 @@ ngx_http_discard_request_body(ngx_http_request_t *r)
 
     if (ngx_http_read_discarded_request_body(r) != NGX_OK) {
         r->count++;
+        r->discard_body = 1;
     }
 
     return NGX_OK;