diff src/http/ngx_http_request.c @ 3415:1b8c3599e3ce

Fix segfault when while discarding body a write event handler is called, 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.
author Igor Sysoev <igor@sysoev.ru>
date Thu, 28 Jan 2010 08:33:24 +0000
parents 42c16d8bddbe
children ee713c767b25
line wrap: on
line diff
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -1997,6 +1997,7 @@ ngx_http_finalize_request(ngx_http_reque
     }
 
     r->done = 1;
+    r->write_event_handler = ngx_http_request_empty_handler;
 
     if (!r->post_action) {
         r->request_complete = 1;