Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] Honor the redirect response overwritten in error_page for absolute urls

Maxim Dounin
January 10, 2013 07:34AM
Hello!

On Thu, Jan 10, 2013 at 07:31:07PM +0800, lanshun zhou wrote:

> Absolute url in error_page is always treated by an internal redirect, even
> if the response
> code is specified with 301/302. This patch honors the response code
> specified and
> makes it possible to redirect with absolute url in error_page easily.

I don't like this change. Current behaviour is well-defined and
allows to do anything (with an additional step in some case). On
the other hand, introducing logic which takes new response code
into account will complicate things. The difference between these
two lines will be counterintuitive:

error_page 301 /foo.html;
error_page 301 =302 /foo.html;

Additionally, it will break configs like this:

error_page 301 =302 /foo.html;

location = /foo.html {
...
}

(I.e. change the response code and return content from the
"/foo.html".)

--
Maxim Dounin
http://nginx.com/support.html

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

[PATCH] Honor the redirect response overwritten in error_page for absolute urls Attachments

lanshun zhou 1041 January 10, 2013 06:32AM

Re: [PATCH] Honor the redirect response overwritten in error_page for absolute urls

Maxim Dounin 578 January 10, 2013 07:34AM

Re: [PATCH] Honor the redirect response overwritten in error_page for absolute urls

lanshun zhou 530 January 10, 2013 11:00AM

Re: [PATCH] Honor the redirect response overwritten in error_page for absolute urls

Maxim Dounin 604 January 10, 2013 11:56AM

Re: [PATCH] Honor the redirect response overwritten in error_page for absolute urls

lanshun zhou 588 January 11, 2013 01:20AM



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

Online Users

Guests: 218
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