- From: Adrien de Croy <adrien@qbik.com>
- Date: Mon, 12 Oct 2009 16:12:01 +1300
- To: HTTP Working Group <ietf-http-wg@w3.org>
Hi all I've been poring through draft-ietf-httpbis-p6-cache-07 trying to figure out what to do in a particular case. This case is where the origin server has a clock that is way out of whack, and specifies expiry times close to the level of error. No Age header, so presumably not from some intermediary cache. The documentation for calculation of the apparent age states: "A response's age can be calculated in two entirely independent ways: 1. now minus date_value, if the local clock is reasonably well synchronized to the origin server's clock. If the result is negative, the result is replaced by zero. 2. age_value, if all of the caches along the response path implement HTTP/1.1." The obvious question being what if the clocks are not reasonably well synchronised, and 2 doesn't hold either (either not all HTTP/1.1 or no Age header)? How can you even tell if a clock is synchronised or not? In that case does the spec not attempt to specify how to calculate age? In my problem case, using now - date_value places a huge skew on the time at which the stored response can no longer be considered fresh. It significantly reduces the effectiveness of the cache. Obviously the resolution is to get the server admin to fix their clock, but that's an uphill battle. I would presume that if you get a response with a Date header, and no Age header from a 1.1 O-S, then you should presume that the Date header is an indication of the local clock at that server (ignoring RTT and time to generate). If there is an age header, you should consider the Date header to be some date in the past from which the Age was subsequently calculated (e.g. caches don't update Date headers to their own value when serving from cache - or do they?). Is this why the age is calculated as the larger of the received age value vs the apparent age rather than the sum of the 2? If a response didn't come from a cache, it cannot have been generated before it was requested. Therefore calculating an apparent age is misguided if there is no age header. A conservative view of the age of a response not from cache should therefore be bounded by the age of the request, rather than the difference in clocks (which can be large). What do browsers commonly do in this case? Regards Adrien -- Adrien de Croy - WinGate Proxy Server - http://www.wingate.com
Received on Monday, 12 October 2009 03:08:45 UTC