Re: RFR 8005068: HttpCookie does not correctly handle negative maxAge values

2016-08-24 Thread Chris Hegarty

On 24/08/16 13:18, Svetlana Nikandrova wrote:

...

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/



I think this looks fine. Thanks Svetlana.

-Chris.


Re: RFR 8005068: HttpCookie does not correctly handle negative maxAge values

2016-08-24 Thread Svetlana Nikandrova

Reminder.

It's a little change and won't take much time to look into.

Thanks,
Svetlana

On 22.08.2016 20:33, Svetlana Nikandrova wrote:

Kindly reminder

On 19.08.2016 16:30, Svetlana Nikandrova wrote:

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/ 



Thank you,
Svetlana









Re: RFR 8005068: HttpCookie does not correctly handle negative maxAge values

2016-08-22 Thread Svetlana Nikandrova

Kindly reminder

On 19.08.2016 16:30, Svetlana Nikandrova wrote:

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/ 



Thank you,
Svetlana







RFR 8005068: HttpCookie does not correctly handle negative maxAge values

2016-08-19 Thread Svetlana Nikandrova

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/ 



Thank you,
Svetlana





Re: RFR: 8005068 - HttpCookie does not correctly handle negative maxAge values

2013-10-21 Thread Chris Hegarty

On 10/21/2013 05:05 PM, Rob McKenna wrote:

Thanks Chris,

I don't mind deferring. Nobody is shouting at me to get this fixed at
the moment.


OK, thanks. If this is just clearing the plate before ZBB, then simply 
target to tbd_minor and archive the webrev/diffs for future.


-Chris.



 -Rob

On 21/10/13 16:21, Chris Hegarty wrote:

Hi Rob,

The changes look fine. ( Trivially the copyright year on the test
should be 2013 ).

Coming so late in the JDK8 development cycle, only P1-3 bugs are being
accepted [1]. I see this is a P4. Should it be deferred to the next
available minor update, or do you think it warrants being fixed in jdk8.

-Chris.

[1] http://openjdk.java.net/projects/jdk8/milestones#Rampdown_start

On 18/10/2013 18:36, Rob McKenna wrote:

Hi folks,

Simple enough change here. As per the description HttpCookie.setMaxAge
will set any arbitrary negative value, while we only check for
MAX_AGE_UNSPECIFIED to determine whether a cookies max age has been
specified or not. This fix sets maxAge to MAX_AGE_UNSPECIFIED if the
setMaxAge(expiry) parameter is < 0.

In addition to that HttpCookie.parse(header) incorrectly sets the maxAge
to a negative value if the expires attribute is in the past. This
effectively means it is unspecified instead of expired. This fix sets
such maxAge values to 0 (expire immediately) instead.

https://bugs.openjdk.java.net/browse/JDK-8005068
http://cr.openjdk.java.net/~robm/8005068/webrev.01/

-Rob





Re: RFR: 8005068 - HttpCookie does not correctly handle negative maxAge values

2013-10-21 Thread Rob McKenna

Thanks Chris,

I don't mind deferring. Nobody is shouting at me to get this fixed at 
the moment.


-Rob

On 21/10/13 16:21, Chris Hegarty wrote:

Hi Rob,

The changes look fine. ( Trivially the copyright year on the test 
should be 2013 ).


Coming so late in the JDK8 development cycle, only P1-3 bugs are being 
accepted [1]. I see this is a P4. Should it be deferred to the next 
available minor update, or do you think it warrants being fixed in jdk8.


-Chris.

[1] http://openjdk.java.net/projects/jdk8/milestones#Rampdown_start

On 18/10/2013 18:36, Rob McKenna wrote:

Hi folks,

Simple enough change here. As per the description HttpCookie.setMaxAge
will set any arbitrary negative value, while we only check for
MAX_AGE_UNSPECIFIED to determine whether a cookies max age has been
specified or not. This fix sets maxAge to MAX_AGE_UNSPECIFIED if the
setMaxAge(expiry) parameter is < 0.

In addition to that HttpCookie.parse(header) incorrectly sets the maxAge
to a negative value if the expires attribute is in the past. This
effectively means it is unspecified instead of expired. This fix sets
such maxAge values to 0 (expire immediately) instead.

https://bugs.openjdk.java.net/browse/JDK-8005068
http://cr.openjdk.java.net/~robm/8005068/webrev.01/

-Rob





Re: RFR: 8005068 - HttpCookie does not correctly handle negative maxAge values

2013-10-21 Thread Chris Hegarty

Hi Rob,

The changes look fine. ( Trivially the copyright year on the test should 
be 2013 ).


Coming so late in the JDK8 development cycle, only P1-3 bugs are being 
accepted [1]. I see this is a P4. Should it be deferred to the next 
available minor update, or do you think it warrants being fixed in jdk8.


-Chris.

[1] http://openjdk.java.net/projects/jdk8/milestones#Rampdown_start

On 18/10/2013 18:36, Rob McKenna wrote:

Hi folks,

Simple enough change here. As per the description HttpCookie.setMaxAge
will set any arbitrary negative value, while we only check for
MAX_AGE_UNSPECIFIED to determine whether a cookies max age has been
specified or not. This fix sets maxAge to MAX_AGE_UNSPECIFIED if the
setMaxAge(expiry) parameter is < 0.

In addition to that HttpCookie.parse(header) incorrectly sets the maxAge
to a negative value if the expires attribute is in the past. This
effectively means it is unspecified instead of expired. This fix sets
such maxAge values to 0 (expire immediately) instead.

https://bugs.openjdk.java.net/browse/JDK-8005068
http://cr.openjdk.java.net/~robm/8005068/webrev.01/

-Rob



RFR: 8005068 - HttpCookie does not correctly handle negative maxAge values

2013-10-18 Thread Rob McKenna

Hi folks,

Simple enough change here. As per the description HttpCookie.setMaxAge 
will set any arbitrary negative value, while we only check for 
MAX_AGE_UNSPECIFIED to determine whether a cookies max age has been 
specified or not. This fix sets maxAge to MAX_AGE_UNSPECIFIED if the 
setMaxAge(expiry) parameter is < 0.


In addition to that HttpCookie.parse(header) incorrectly sets the maxAge 
to a negative value if the expires attribute is in the past. This 
effectively means it is unspecified instead of expired. This fix sets 
such maxAge values to 0 (expire immediately) instead.


https://bugs.openjdk.java.net/browse/JDK-8005068
http://cr.openjdk.java.net/~robm/8005068/webrev.01/

-Rob