Maxim Dounin
October 21, 2009 07:24AM
Hello!

On Wed, Oct 21, 2009 at 05:27:11AM -0400, mastercan wrote:

> Hi,
>
> I have the following config (just a snippet):
>
> set $memcached_key $uri;
> default_type "text/html; charset=utf-8";
> error_page 404 @fallback;

- error_page 404 @fallback;
+ error_page 404 = @fallback;

> The problem is, that whenever memcached does not find the value in memory, I get a 404 status code.
> My fallback is an Apache HTTP server which handles the request via mod_php. In case of a 404 the request is forwarded to Apache/PHP, PHP updates memcached, and the result is returned via nginx.
> BUT the status code header is not correct. Even if I manually set a 200 OK header in PHP, a 404 header is returned by nginx.
> If the the URI is in memcached already, a normal 200 OK header is returned.
>
> So - to me this seems like a bug?

Yes, in your config.

And I checked wiki - it seems to have incorrect description for
error_page. I've reverted erroneous change, it should now be fine
now. Feel free to see for more details:

http://wiki.nginx.org/NginxHttpCoreModule#error_page

Maxim Dounin
Subject Author Posted

Bug in memcached module?

mastercan October 21, 2009 05:27AM

Re: Bug in memcached module?

mastercan October 21, 2009 05:32AM

Re: Bug in memcached module?

Maxim Dounin October 21, 2009 07:24AM

Re: Bug in memcached module?

mastercan October 21, 2009 07:44AM

Re: Bug in memcached module?

Igor Sysoev October 21, 2009 08:02AM

Re: Bug in memcached module?

mastercan October 21, 2009 08:17AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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