what exactly does proxy_http_version mean?

Maxim Dounin mdounin at mdounin.ru
Tue Jul 3 17:13:03 UTC 2012


On Tue, Jul 03, 2012 at 09:58:12AM -0400, admon.org wrote:

> Many thanks Francis!
> Here are my configs, I'm using Nginx as a reverse proxy server to cache
> static files from its upstream servers.


> I'm trying to implement a smart way to purge cache e.g. by touching the
> file to change its etag. This needs the HTTP/1.1 support. But per my
> tests, Nginx does not return expected value.
> $ curl -I -H 'If-None-Match: "9cx7b1-x2e-44xa4x9axd0x0"'
> http://test.stg/crossdomain.xml 
> This command gives 200 OK return code, but if I use Varnish instead, it
> gives the expected value 304 Not Modified.
> So I'm wondering that it may be caused by the protocal between Nginx and
> the upstream server.
> Can you help have another check. Appriciated!

With cache switched on nginx strips all conditional headers in 
requests to backends to make sure it'll get full response which 
may be cached.  And as nginx itself doesn't support entity tags 
yet, the request with If-None-Match doesn't return 304.

Support for entity tags are expected to appear soon, somewhere 
near upcoming 1.3.3.

Maxim Dounin

More information about the nginx mailing list