Re: HTTP Age Header Field (Section 14.6) - should overflow value be 2^31 or (2^31)-1?

On Mon, 13 Mar 2000, John Stracke wrote:

> Matthew Delco wrote:
> 
> > Section 14.6 of RFC 2616 states that if a cache receives an age that is
> > larger than it can represent, or if overflow occurs, then it must transmit
> > an Age header with a value of 2147483648 (2^31).  Was the intent to select
> > the largest unsigned 31-bit integer, which is really (2^31)-1, or is there
> > some other rationale behind this choice?
> 
> 2^31 is the smallest positive integer which cannot be represented in a signed
> 32-bit value; was that it?

I guess my main question is whether 1) it was the intent of the HTTP
specification to pick a 'maximum' value which can be represented by a
signed 32-bit value (and thus 2^31 was accidentally specified instead of
2^31-1), or 2) a conscious decision was made to specify a value outside of
this range.  The later case seems less likely, but if it's true then I'm
having trouble seeing why such value was selected given that it's likely
to add some (admittedly trivial) complexity to an implementation.  The
spec. could be read as stating "if a cache receives a value larger than
the largest positive integer it can represent ... it MUST transmit a Age
header with a value [larger than it can represent]".  Anyway, I doubt
there will ever be a page that's almost 70 years old, but it struck me as
odd nonetheless.

MD

Received on Monday, 13 March 2000 11:50:59 UTC