changeset 1653:ea681a6a0c61

set r->headers_out.location for non-local redirects
author Igor Sysoev <igor@sysoev.ru>
date Tue, 27 Nov 2007 11:52:37 +0000
parents cc7a7d0b89e8
children e5c547a225bd
files src/http/ngx_http_upstream.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -2609,6 +2609,10 @@ ngx_http_upstream_rewrite_location(ngx_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()