Mercurial > hg > nginx
comparison src/http/ngx_http_core_module.c @ 6977:be5cfa918bfc
Added support for the "308 Permanent Redirect" (ticket #877).
author | Simon Leblanc <contact@leblanc-simon.eu> |
---|---|
date | Tue, 11 Apr 2017 03:13:46 +0200 |
parents | 99934aade555 |
children | 0cdee26605f3 |
comparison
equal
deleted
inserted
replaced
6976:6c13008ad503 | 6977:be5cfa918bfc |
---|---|
1892 } | 1892 } |
1893 | 1893 |
1894 if (status == NGX_HTTP_MOVED_PERMANENTLY | 1894 if (status == NGX_HTTP_MOVED_PERMANENTLY |
1895 || status == NGX_HTTP_MOVED_TEMPORARILY | 1895 || status == NGX_HTTP_MOVED_TEMPORARILY |
1896 || status == NGX_HTTP_SEE_OTHER | 1896 || status == NGX_HTTP_SEE_OTHER |
1897 || status == NGX_HTTP_TEMPORARY_REDIRECT) | 1897 || status == NGX_HTTP_TEMPORARY_REDIRECT |
1898 || status == NGX_HTTP_PERMANENT_REDIRECT) | |
1898 { | 1899 { |
1899 ngx_http_clear_location(r); | 1900 ngx_http_clear_location(r); |
1900 | 1901 |
1901 r->headers_out.location = ngx_list_push(&r->headers_out.headers); | 1902 r->headers_out.location = ngx_list_push(&r->headers_out.headers); |
1902 if (r->headers_out.location == NULL) { | 1903 if (r->headers_out.location == NULL) { |