diff src/http/ngx_http_special_response.c @ 4206:1a94a56a4e5d

Clear old Location header (if any) while adding a new one. This prevents incorrect behaviour when another redirect is issued within error_page 302 handler.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 12 Oct 2011 13:28:03 +0000
parents 1d52dd2b5bb7
children d620f497c50f
line wrap: on
line diff
--- a/src/http/ngx_http_special_response.c
+++ b/src/http/ngx_http_special_response.c
@@ -582,6 +582,8 @@ ngx_http_send_error_page(ngx_http_reques
     ngx_str_set(&location->key, "Location");
     location->value = uri;
 
+    ngx_http_clear_location(r);
+
     r->headers_out.location = location;
 
     clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);