[PATCH 2 of 2] Cache: send conditional requests only for cached 200 OK responses

Maxim Dounin mdounin at mdounin.ru
Mon Nov 24 15:03:59 UTC 2014


Hello!

On Sun, Nov 23, 2014 at 03:45:42AM -0800, Piotr Sikora wrote:

> Hey Maxim,
> 
> > For example, it can be usable with 206 responses as well (and this
> > is perfectly allowed by the RFC).
> 
> 206 responses won't be cached by nginx, so that's kind of a moot point.

That's up to a configuration.

> > I still think this approach is wrong, the behaviour shouldn't
> > depend on the status code.
> 
> Why not? How else do you want to fix this problem?

Which problem?  You are trying to convince me that that 
conditional requests shouldn't be used to revalidate responses 
with non-200 status code because it may not work with some 
upstream servers.  Sure, this can happen.  Moreover, it can happen 
with responses with 200 status code, too.  Two trivial solutions 
include:

- fix an upstream server;

- disable use of conditional requests, it's off by default.

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx-devel mailing list