Hello,
The following Squid code prevents adding an "Age: 0" header to
cache hits. Squid sends positive age values only, violating RFC 2616:
> * BROWSER WORKAROUND: IE sometimes hangs when receiving a 0 Age
> * header, so don't use it unless there is a age to report. Please
> * note that Age is only used to make a conservative estimation of
> * the objects age, so a Age: 0 header does not add any useful
> * information to the reply in any case.
> */
...
> if (http->storeEntry()->timestamp < squid_curtime) {
> hdr->putInt(HDR_AGE,
> squid_curtime - http->storeEntry()->timestamp);
The above lines were added to Squid3 in March 2000 (trunk r4375). The
log message says "Merge changes from 2.3 branch. Mostly this is
copyright text changes."
I believe the hack origins are related to this January 2000 patch:
http://devel.squid-cache.org/hno/patches/squid-2.2.STABLE5.age.patch
The above patch sites IE5 as the possible culprit. Henrik may remember
the missing details.
I see several options:
0a) Do nothing. Continue to violate RFC 2616. Keep IE5 users happy.
0b) Wrap the IE5 exception in USE_HTTP_VIOLATIONS. Since that #define is
enabled by default, it does not change stock Squid behavior, but we can
start testing compliance using an unrealistic USE_HTTP_VIOLATIONS=0
configuration to hide this violation.
1) Remove the hack. Fix the violation. Upset IE5 users.
2) Make the hack conditional on IE5. I assume it is possible via the
User-Agent header parsing, but I am not sure. This would effectively fix
the violation. This option requires more development work and makes all
zero-age hits slightly slower to keep IE5 users happy.
I suggest #1, with #2 as a backup plan if we get complaints.
What do you recommend?
Thank you,
Alex.
P.S. The workaround comment itself is technically incorrect because
Age:0 header is useful for detecting from-cache responses, but let's
ignore that for now.
Received on Mon Sep 27 2010 - 20:43:52 MDT
This archive was generated by hypermail 2.2.0 : Thu Sep 30 2010 - 12:00:08 MDT