Welcome! Log In Create A New Profile

Advanced

rewritten redirect with relative url

Dave Bailey
January 31, 2012 06:40PM
Hi,

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.

Is this intended behavior? If it is not, I attached a patch that sets
r->headers_out.location consistently.

-dave
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

rewritten redirect with relative url Attachments

Dave Bailey 1792 January 31, 2012 06:40PM

Re: rewritten redirect with relative url

Maxim Dounin 613 January 31, 2012 08:14PM

Re: rewritten redirect with relative url

Dave Bailey 1041 January 31, 2012 08:38PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 250
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready