Request for review: 8000525: api does not support 2-digit year format

Rob McKenna rob.mckenna at
Thu Dec 6 21:19:30 UTC 2012

Hi folks,

According to

There are 3 http cookie specifications:

    Netscape draft
    RFC 2109 -/
    RFC 2965 -/

HttpCookie class can accept all these 3 forms of syntax.

According to section 10.1.2:

Netscape's original proposal defined an Expires header that took a date 
value in a fixed-length variant format in place of Max-Age: Wdy, 

Thats in the "Historical" section provided to allow for compatibility 
with Netscape's implementation, which we also support: (as per )

While we don't support the rfc explicitly, this change follows the 
format specified in section 5.1.1 of rfc 6265:

3. If the year-value is greater than or equal to 70 and less than or 
equal to 99, increment the year-value by 1900.
4. If the year-value is greater than or equal to 0 and less than or 
equal to 69, increment the year-value by 2000.
     1. NOTE: Some existing user agents interpret two-digit years 

The webrev is at: 

Note: The addition of setLenient(false) has required changes to two 
existing testcases.


More information about the core-libs-dev mailing list