From 333be9fe57241a3303d816a40adfc4ff58cfeea3 Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Mon, 4 Jun 2012 10:52:43 +0000 Subject: [PATCH] Merge of r4615: write handler reset in ngx_http_named_location(). On internal redirects this happens via ngx_http_handler() call, which is not called on named location redirect. As a result incorrect write handler remained (if previously set) and this might cause incorrect behaviour (likely request hang). Patch by Yichun Zhang (agentzh). --- src/http/ngx_http_core_module.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 42dd6644e..29b918eaa 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -2599,6 +2599,7 @@ ngx_http_named_location(ngx_http_request_t *r, ngx_str_t *name) r->phase_handler = cmcf->phase_engine.location_rewrite_index; + r->write_event_handler = ngx_http_core_run_phases; ngx_http_core_run_phases(r); return NGX_DONE;