diff options
author | Ruslan Ermilov <ru@nginx.com> | 2012-02-27 11:43:40 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@nginx.com> | 2012-02-27 11:43:40 +0000 |
commit | 1c57fb87905926519e2aef149b645d069328489e (patch) | |
tree | cacc864ff57273b5c20c678b85d82a716632bfc1 /src/http/ngx_http_core_module.c | |
parent | 09422e632f5768d1de432e4a3cef9459b685418c (diff) | |
download | nginx-1c57fb87905926519e2aef149b645d069328489e.tar.gz nginx-1c57fb87905926519e2aef149b645d069328489e.zip |
Added support for the 307 Temporary Redirect.
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r-- | src/http/ngx_http_core_module.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 35b538b6e..96e999718 100644 --- 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_t *r, ngx_uint_t status, 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); |