Mercurial > hg > nginx-quic
diff src/http/ngx_http_script.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 | 77f667dd0504 |
children | d620f497c50f |
line wrap: on
line diff
--- a/src/http/ngx_http_script.c +++ b/src/http/ngx_http_script.c @@ -1106,6 +1106,8 @@ ngx_http_script_regex_end_code(ngx_http_ "rewritten redirect: \"%V\"", &e->buf); } + ngx_http_clear_location(r); + r->headers_out.location = ngx_list_push(&r->headers_out.headers); if (r->headers_out.location == NULL) { e->ip = ngx_http_script_exit;