aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2007-11-27 11:52:37 +0000
committerIgor Sysoev <igor@sysoev.ru>2007-11-27 11:52:37 +0000
commit685fd087530505754c4e09d21331742882648263 (patch)
tree262145a3706b02040befcc56a8f536db301ed1f0 /src
parent13f5ff9d7efce9dd9ffa4e22d6f56089a6a491f0 (diff)
downloadnginx-685fd087530505754c4e09d21331742882648263.tar.gz
nginx-685fd087530505754c4e09d21331742882648263.zip
set r->headers_out.location for non-local redirects
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_upstream.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index 0c36925d9..4502c1799 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -2609,6 +2609,10 @@ ngx_http_upstream_rewrite_location(ngx_http_request_t *r, ngx_table_elt_t *h,
return rc;
}
+ if (ho->value.data[0] != '/') {
+ r->headers_out.location = ho;
+ }
+
/*
* we do not set r->headers_out.location here to avoid the handling
* the local redirects without a host name by ngx_http_header_filter()