W3C home > Mailing lists > Public > ietf-http-wg-old@w3.org > January to April 2000

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

From: Matthew Delco <delco@CS.Berkeley.EDU>
Date: Mon, 13 Mar 2000 11:46:45 -0800 (PST)
To: http-wg@hplb.hpl.hp.com
Message-ID: <Pine.SOL.4.10.10003131108090.27479-100000@cuzco.CS.Berkeley.EDU>
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 19:50:36 EST

This archive was generated by hypermail pre-2.1.9 : Wednesday, 24 September 2003 06:33:36 EDT