Request for review: 8000525: Java.net.httpcookie api does not support 2-digit year format
rob.mckenna at oracle.com
Thu Dec 6 21:19:30 UTC 2012
According to HttpCookie.java:
There are 3 http cookie specifications:
RFC 2109 -/http://www.ietf.org/rfc/rfc2109.txt/
RFC 2965 -/http://www.ietf.org/rfc/rfc2965.txt/
HttpCookie class can accept all these 3 forms of syntax.
According to http://www.ietf.org/rfc/rfc2109.txt 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,
DD-Mon-YY HH:MM:SS GMT
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
More information about the core-libs-dev