# HG changeset patch # User Igor Sysoev # Date 1264667604 0 # Node ID 1b8c3599e3ce88d336ade10dfc636eb4d67c14b5 # Parent cc327fa82f63cdc0945bbc2f8715216c35d58c9e 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. diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c --- 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;