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

From: Amos Jeffries <>
Date: Thu, 18 Nov 2010 00:59:16 +1300

On 18/11/10 00:18, Riccardo Pizzi wrote:
> 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

If-None-Match behaviour has been mostly corrected in (beta).
There is just one last patch from bug for correct RFC
compliance as expected by the browsers.


Please be using
   Current Stable Squid 2.7.STABLE9 or 3.1.9
   Beta testers wanted for
Received on Wed Nov 17 2010 - 11:59:21 MST

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