[PATCH 2 of 2] Cache: send conditional requests only for cached 200 OK responses
Maxim Dounin
mdounin at mdounin.ru
Wed Nov 26 14:54:15 UTC 2014
Hello!
On Tue, Nov 25, 2014 at 05:14:48PM -0800, Piotr Sikora wrote:
> Hey Maxim,
>
> > The question is: how many other status codes should be considered?
> > I _think_ that 200 and 206 is good enough list, but I'm not sure.
>
> Well, even if we miss a status code or two (and I don't think that we
> do), then the worst thing that's going to happen is, to quote your
> argument from the other thread, "suboptimal operation, nothing really
> bad can happen", which is much, much better than the current
> situation.
Fair enough.
> > Here is the first problem in the upstream server: it returns an
> > error with the Last-Modified. This is what nginx avoids for a
> > reason.
>
> As far as I can tell, that's neither wrong nor forbidden by RFC.
Much like nginx behaviour to use it in the If-Modified-Since. So
nobody does anything wrong/forbidden, but there is a problem as a
result. And nginx already does at least two things to mitigate
such problems on server-side, and it probably won't hurt much to
add another client-side mitigation.
--
Maxim Dounin
http://nginx.org/
More information about the nginx-devel
mailing list