proxy_cache incorrectly returning 304 Not Modified
j at jonathanleighton.com
Fri Jan 10 12:18:18 UTC 2014
Thanks for your reply.
>> 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.
> This easily can be a result of a misconfiguration (e.g.,
> proxy_set_header used incorrectly) and/or backend
> Additionally, response headers looks very suspicious. There
> shouldn't be "Status: 304 Not Modified" in nginx responses, and
> "Connection: Close" capitalization doesn't match what nginx uses.
> Unless it's something introduced by Pingdom interface, this may
> indicate that it's checking something which isn't nginx.
Thank you. I reviewed my configuration and made some tweaks, but I'm
still having trouble. Actually I haven't seen the 304 Not Modified
again, but now I am getting a blank response body for the cached page ("/").
GET / HTTP/1.0
Cache-Control: max-age=600, public
Content-Type: text/html; charset=utf-8
Date: Fri, 10 Jan 2014 11:49:44 GMT
Status: 200 OK
X-XSS-Protection: 1; mode=block
Do you know of any reasons why the response might be blank? I copied the
cache file so I could review it, and I checked that the X-Request-Id
matches so it's definitely the same entry. The cache file *does* contain
the response body - in gzip form. I am using "gzip off" for this
location block, so I don't think nginx is interfering there. I'm at a
complete loss about why this is happening, any ideas you have would be
More information about the nginx