Behaviour of Date and Age Headers on Proxy Revalidate

RFC2616 states that

    the Age response-header field conveys the sender's estimate of the
    amount of time since the response (or its revalidation) was
    generated at the origin server

but that
    
    the Date general-header field represents the date and time at
    which the message was originated,

leaving out the behaviour for a proxy after a revalidation for the
Date header.  This leaves two possibilities:

a) The Date represents the time of the original message:

   This is the behaviour of squid 2.5, but looks very weird for
   some objects to me:

   Assume an object has "Cache-Control: max-age=60" and the object is
   queried periodically using a proxy:

   t+0   Object is requested the first time, proxy requests it from
         the web server and forwards the response:
         -> Date: D, no Age
   t+25  Object is queried again, proxy delivers it from its cache:
         -> Date: D, Age: 25
   t+50  Same as above:
         -> Date: D, Age: 50
   t+75  Object reached its max-age, proxy sends a conditional
         request (If-Modified-Since) to revalidate the object;
         web server returns "304 Not Modified" and Date: D+75,
         but as chosen for this case, the web server returns
         -> Date: D, no Age
         because D is the creation date of the cached object and
         no time has been spent since the revalidation.
   t+100 Object is queried again, proxy delivers it from its cache:
         -> Date: D, Age: 25

   What distracts me mostly is that "Date" + "Age" is not monotonic in
   this case because I would like that "Date" + "Age" is an estimate
   for the current time of the clock of the web server (apart from
   network delays).

b) The Date represents the time of the original message or last
   revalidation:

   This would return

   t+0   -> Date: D, no Age
   t+25  -> Date: D, Age: 25
   t+50  -> Date: D, Age: 50
   t+75  -> Date: D+75, no Age
   t+100 -> Date: D+75, Age: 25

   which looks much more convenient to me, but if the object contains
   an Expires response header, this has to be updated, too, whenever
   an object is revalidated and thereby the Date header replaced.

Any comments which version behaves "better"/which behaviour is intended
by the standard? Are there any additional side effects of the two cases?

Boris.

Received on Monday, 23 January 2006 18:20:09 UTC