5 messages in ru.sysoev.nginxRe: "fallback" response code
FromSent OnAttachments
Phillip OldhamJun 9, 2009 12:04 am 
andan andanJun 9, 2009 1:12 am 
Igor SysoevJun 9, 2009 1:14 am 
Maxim DouninJun 9, 2009 1:17 am 
Systems MaintenanceJun 11, 2009 4:22 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: "fallback" response codeActions...
From:Igor Sysoev (is@rambler-co.ru)
Date:Jun 9, 2009 1:14:06 am
List:ru.sysoev.nginx

On Tue, Jun 09, 2009 at 10:12:43AM +0200, andan andan wrote:

2009/6/9 Phillip Oldham <phi@theactivitypeople.co.uk>:

I'm using a custom perl script in the following way:

location ~ ^/resources {     error_page 404 @fallback; }

location @fallback {     perl MyModule::handler; }

The fallback works as expected, apart from that it always returns a 404 with content, rather than a 200.

Is there any way to force a 200 when I'm sending content back to the browser from either the Perl script or from the @fallback block?

According with documentation:

Furthermore, it is possible to change the code of answer to another, for example: error_page 404 =200 /.empty.gif;

I suppose that this works well with @fallback

Or

error_page 404 = @fallback;

then it will be used the MyModule::handler's response code.