[squid-users] Squid only sends If-None-Match to origin server if the client sends it?

From: Riccardo Pizzi <pizzi_at_leopardus.com>
Date: Wed, 17 Nov 2010 12:18:32 +0100

Hi,

I am using Squid 2.6.STABLE21 in accelerator mode and trying to cache dynamic content.
My origin server appends an ETag header that is a MD5 of the actual page, and when
a client sends the if-none-match with matching ETag, a 304 is returned instead of the page
unless the page changed in the meantime.

I have noticed that Squid sends the ETag only when the client (browser) includes it in
the request; otherwise, it is not sent at all.

My expected behaviour would be that when a new request for a cached page comes,
Squid revalidates with the origin server generating its own if-none-match header,
but this is not the case and I get a 200 response from origin server every time,
unless, again, the browser itself sends a if-none-match with the actual etag value.

Is there a way to have Squid *originating* the if-none-match header on behalf of the clients?

Ideally, I would disregard the clients' if-none-match header because it could contain an
outdated ETag, so they would ask Squid for the latest version of the page, Squid would
check with origin *every time* (using its own if-none-match request) and then serve
the page to the browser (with a 200 response code and current ETag from cache).

Has anybody a working setup like this? I will gladly accept all solutions, including patches,
code modifications or version changes...

Thanks in advance,

Rick

-- 
Riccardo Pizzi
pizzi_at_leopardus.com
http://www.vecchiflipper.it
http://www.pinballowners.com/webmaster
Dogs have masters. Cats have staff.
Received on Wed Nov 17 2010 - 11:18:39 MST

This archive was generated by hypermail 2.2.0 : Wed Nov 17 2010 - 12:00:03 MST