"fallback" response code

andan andan armdan20 at gmail.com
Tue Jun 9 12:12:43 MSD 2009


2009/6/9 Phillip Oldham <phill at 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

BR.





More information about the nginx mailing list