Mercurial > hg > nginx
diff src/http/ngx_http_core_module.c @ 4491:d11f86a16e3b
Added support for the 307 Temporary Redirect.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Mon, 27 Feb 2012 11:43:40 +0000 |
parents | 7033faf6dc3c |
children | 13e09cf11d4e |
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -1824,8 +1824,11 @@ ngx_http_send_response(ngx_http_request_ return NGX_HTTP_INTERNAL_SERVER_ERROR; } - if (status >= NGX_HTTP_MOVED_PERMANENTLY && status <= NGX_HTTP_SEE_OTHER) { - + if (status == NGX_HTTP_MOVED_PERMANENTLY + || status == NGX_HTTP_MOVED_TEMPORARILY + || status == NGX_HTTP_SEE_OTHER + || status == NGX_HTTP_TEMPORARY_REDIRECT) + { ngx_http_clear_location(r); r->headers_out.location = ngx_list_push(&r->headers_out.headers);