Re: Nginx unexpectedly returning 304 for content cached from proxy

Hi,
i just hit the same issue as is described in
http://www.ruby-forum.com/topic/188902 with nginx 0.7.64. Also the
workaround
proxy_set_header If-None-Match “”;
does work properly.

I think the problem is just one typo in a source code, please check
the attached patch.

On Thu, Dec 17, 2009 at 2:50 AM, David K. [email protected]
wrote:

Hi,
i just hit the same issue as is described in
http://www.ruby-forum.com/topic/188902 with nginx 0.7.64. Also the
workaround
proxy_set_header If-None-Match “”;
does work properly.

I think the problem is just one typo in a source code, please check
the attached patch.

Just hit the same issue on latest Ubuntu stable package (0.7.62) when
we introduced proxy_cache into our QA environment.

The bug actually breaks our sites specacularly depending on the order
and timing of requests that come into the proxy; everybody can get a
304 for stylesheets as mentioned by previous posters.

David, why do you say the workaround (proxy_set_header If-None-Match
“”) not work properly? It seems like it should…

I’m trying to figure out if I need to abandon the packaged nginx from
Ubuntu (an adminsitrative hassle) to apply this patch.
Igor, is this patch planned for inclusion 0.7.65?

Thanks,


RPM

If using proxy_set_header If-None-Match “”;then when the cache file
expired the cache server will get the file again from the backend server
even if the file is not changed,it’s not good for a high traffic load
site.
Maybe the nginx should see if the cache key exist first:
if exist then fw the If-None-Match header to backend,if the file has
been changed, get file from the backend and overwrite the cache file,if
not changes,reture 304,then remain the cache file.
if no exist,then get rid of the If-None-Match header to get a new file
from the backend

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,2703,43781#msg-43781

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs