]> git.kaiwu.me - nginx.git/commitdiff
Fix segfault when while discarding body a write event handler is called,
authorIgor Sysoev <igor@sysoev.ru>
Thu, 28 Jan 2010 08:33:24 +0000 (08:33 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Thu, 28 Jan 2010 08:33:24 +0000 (08:33 +0000)
runs ngx_http_core_run_phases(), and starts a request processing again.
The write event has clear type and remained in a keepalive connection.
The bug was introduced in r3050.

src/http/ngx_http_request.c

index 30639810d43550c09ac5b425991cb1cf900c3f04..63eccf1773eebb40e2cef9b0ac098a232517416a 100644 (file)
@@ -1997,6 +1997,7 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc)
     }
 
     r->done = 1;
+    r->write_event_handler = ngx_http_request_empty_handler;
 
     if (!r->post_action) {
         r->request_complete = 1;