Hi,<br><br>In ngx_http_upstream_rewrite_location(), r->upstream->rewrite_redirect may replace the Location header value with a new value.  This value ends up going through ngx_http_header_filter(), and if it's a relative URL, the header filter adds a scheme and host to it.  However, if r->upstream->rewrite_redirect declines (rc = NGX_DECLINED) to rewrite the redirect, the value does not go through ngx_http_header_filter() even if it is a relative URL.<br>
<br>Is this intended behavior?  If it is not, I attached a patch that sets r->headers_out.location consistently.<br><br>-dave<br><br>