]> git.kaiwu.me - nginx.git/commitdiff
Bugfix: read event was not blocked after reading body.
authorMaxim Dounin <mdounin@mdounin.ru>
Mon, 5 Sep 2011 12:43:31 +0000 (12:43 +0000)
committerMaxim Dounin <mdounin@mdounin.ru>
Mon, 5 Sep 2011 12:43:31 +0000 (12:43 +0000)
Read event should be blocked after reading body, else undefined behaviour
might occur on additional client activity.  This fixes segmentation faults
observed with proxy_ignore_client_abort set.

src/http/ngx_http_request_body.c

index 03053c86a488e04ddd2eef27f9b0e2873f8ae442..817b48e4555780e6992b77aa22bea15f11d0f8a6 100644 (file)
@@ -378,6 +378,8 @@ ngx_http_do_read_client_request_body(ngx_http_request_t *r)
         rb->bufs = rb->bufs->next;
     }
 
+    r->read_event_handler = ngx_http_block_reading;
+
     rb->post_handler(r);
 
     return NGX_OK;