Mercurial > hg > nginx
comparison 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 |
comparison
equal
deleted
inserted
replaced
4205:26c307b8dc3c | 4206:1a94a56a4e5d |
---|---|
580 | 580 |
581 location->hash = 1; | 581 location->hash = 1; |
582 ngx_str_set(&location->key, "Location"); | 582 ngx_str_set(&location->key, "Location"); |
583 location->value = uri; | 583 location->value = uri; |
584 | 584 |
585 ngx_http_clear_location(r); | |
586 | |
585 r->headers_out.location = location; | 587 r->headers_out.location = location; |
586 | 588 |
587 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); | 589 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); |
588 | 590 |
589 if (clcf->msie_refresh && r->headers_in.msie) { | 591 if (clcf->msie_refresh && r->headers_in.msie) { |