RFR 8005068: HttpCookie does not correctly handle negative maxAge values

Svetlana Nikandrova svetlana.nikandrova at oracle.com
Fri Aug 19 13:30:26 UTC 2016


Hello,

please review this fix. Javadoc for HttpCookie setMaxAge states that " A 
negative value means that cookie is not stored persistently" and "max 
age is unspecified", but hasExpired only checks for "-1" as possible 
negative value. Also changed max age for parsed cookies with "expires" 
date in the past from negative delta seconds to 0 as negative value 
should be treated as "non specified" (but not expired).

JBS:
https://bugs.openjdk.java.net/browse/JDK-8005068
Webrev:
http://cr.openjdk.java.net/~snikandrova/8005068/webrev.00/ 
<http://cr.openjdk.java.net/%7Esnikandrova/8005068/webrev.00/>

Thank you,
Svetlana



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/net-dev/attachments/20160819/19bd5f18/attachment.html>


More information about the net-dev mailing list