summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2012-06-04 10:52:43 +0000
committerMaxim Dounin <mdounin@mdounin.ru>2012-06-04 10:52:43 +0000
commit7162fdee0f0061f0594a155e470b8193600738d7 (patch)
tree6360aaa3ba5f47d9e19243cabe89627a7eecf25c
parentf87ed889a0b7e54da973102bf9424c1a672ff6f3 (diff)
downloadnginx-7162fdee0f0061f0594a155e470b8193600738d7.tar.gz
nginx-7162fdee0f0061f0594a155e470b8193600738d7.tar.bz2
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).
-rw-r--r--src/http/ngx_http_core_module.c1
1 files changed, 1 insertions, 0 deletions
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;