Welcome! Log In Create A New Profile

Advanced

Re: "fallback" response code

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

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


--
Igor Sysoev
http://sysoev.ru/en/
Subject Author Posted

"fallback" response code

Phillip Oldham June 09, 2009 03:05AM

Re: "fallback" response code

andan andan June 09, 2009 04:12AM

Re: "fallback" response code

Igor Sysoev June 09, 2009 04:14AM

Re: "fallback" response code

Maxim Dounin June 09, 2009 04:17AM

Re: "fallback" response code

Systems Maintenance June 11, 2009 07:22AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 248
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready