"fallback" response code
Maxim Dounin
mdounin at mdounin.ru
Tue Jun 9 12:17:31 MSD 2009
Hello!
On Tue, Jun 09, 2009 at 08:05:22AM +0100, Phillip Oldham wrote:
> I'm using a custom perl script in the following way:
>
> location ~ ^/resources {
> error_page 404 @fallback;
- error_page 404 @fallback;
+ 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?
You may force 200 by using =200, but it's not really what you
want since this will prevent you from doing 302 redirects and so
on. The above just uses return code of the fallback handler.
Maxim Dounin
More information about the nginx
mailing list