changeset 3179:74b74513ed59

update r3167: do not set r->discard_body if the body has been just discarded
author Igor Sysoev <igor@sysoev.ru>
date Fri, 02 Oct 2009 09:46:04 +0000
parents 975f0558aab3
children 0e420f3f8e18
files src/http/ngx_http_request_body.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/ngx_http_request_body.c
+++ b/src/http/ngx_http_request_body.c
@@ -469,8 +469,6 @@ ngx_http_discard_request_body(ngx_http_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_r
 
     if (ngx_http_read_discarded_request_body(r) != NGX_OK) {
         r->count++;
+        r->discard_body = 1;
     }
 
     return NGX_OK;