comparison 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
comparison
equal deleted inserted replaced
4490:0cc1b430a0e6 4491:d11f86a16e3b
1822 1822
1823 if (ngx_http_complex_value(r, cv, &val) != NGX_OK) { 1823 if (ngx_http_complex_value(r, cv, &val) != NGX_OK) {
1824 return NGX_HTTP_INTERNAL_SERVER_ERROR; 1824 return NGX_HTTP_INTERNAL_SERVER_ERROR;
1825 } 1825 }
1826 1826
1827 if (status >= NGX_HTTP_MOVED_PERMANENTLY && status <= NGX_HTTP_SEE_OTHER) { 1827 if (status == NGX_HTTP_MOVED_PERMANENTLY
1828 1828 || status == NGX_HTTP_MOVED_TEMPORARILY
1829 || status == NGX_HTTP_SEE_OTHER
1830 || status == NGX_HTTP_TEMPORARY_REDIRECT)
1831 {
1829 ngx_http_clear_location(r); 1832 ngx_http_clear_location(r);
1830 1833
1831 r->headers_out.location = ngx_list_push(&r->headers_out.headers); 1834 r->headers_out.location = ngx_list_push(&r->headers_out.headers);
1832 if (r->headers_out.location == NULL) { 1835 if (r->headers_out.location == NULL) {
1833 return NGX_HTTP_INTERNAL_SERVER_ERROR; 1836 return NGX_HTTP_INTERNAL_SERVER_ERROR;