Welcome! Log In Create A New Profile

Advanced

proxy_cache incorrectly returning 304 Not Modified

Jon Leighton
January 08, 2014 09:58AM
Hi there,

I work on a site which has nginx in front of a Rails application, and we
use proxy_cache.

For the home page, our application returns a "max-age=600, public"
Cache-Control header, and we have nginx configured to cache the response
using proxy_cache.

This generally works fine, but last night nginx started to respond with
304 Not Modified to requests that *didn't* include any caching headers
(If-Modified-Since or ETag). Our Pingdom alerts showed this issue, and
here is the request/response captured:

GET / HTTP/1.0
User-Agent: Pingdom.com_bot_version_1.4_(http://www.pingdom.com/)
Host: loco2.com

304 Not Modified
Cache-Control: max-age=600, public
Date: Tue, 07 Jan 2014 22:59:32 GMT
ETag: "900e1f11422519337c9ed25fad299ce0"
Server: nginx/1.4.4
Status: 304 Not Modified
Strict-Transport-Security: max-age=31536000
X-Cache-Status: HIT
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Request-Id: c7ee78ab-df49-4467-bced-753b2cc622ab
X-UA-Compatible: chrome=1
X-XSS-Protection: 1; mode=block
Connection: Close

Does this look like a bug? Or could it be a configuration issue? I can't
think of any reason why this should be the correct thing for the proxy
cache to do.

Many thanks,

Jon

--
http://jonathanleighton.com/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

proxy_cache incorrectly returning 304 Not Modified

Jon Leighton January 08, 2014 09:58AM

Re: proxy_cache incorrectly returning 304 Not Modified

Maxim Dounin January 09, 2014 09:48AM

Re: proxy_cache incorrectly returning 304 Not Modified

Jon Leighton January 10, 2014 07:20AM

Re: proxy_cache incorrectly returning 304 Not Modified

Jon Leighton January 10, 2014 07:56AM

Re: proxy_cache incorrectly returning 304 Not Modified

Maxim Dounin January 10, 2014 11:08AM

Re: proxy_cache incorrectly returning 304 Not Modified

Jon Leighton January 10, 2014 11:38AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 92
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready