[#712] Fix parsing dates in the past bug in CookieDecoder
This commit is contained in:
parent
88c2200264
commit
55457691d2
@ -134,12 +134,10 @@ public class CookieDecoder {
|
||||
long maxAgeMillis =
|
||||
new CookieDateFormat().parse(value).getTime() -
|
||||
System.currentTimeMillis();
|
||||
if (maxAgeMillis <= 0) {
|
||||
maxAge = 0;
|
||||
} else {
|
||||
maxAge = (int) (maxAgeMillis / 1000) +
|
||||
(maxAgeMillis % 1000 != 0? 1 : 0);
|
||||
}
|
||||
|
||||
maxAge = (int) (maxAgeMillis / 1000) +
|
||||
(maxAgeMillis % 1000 != 0? 1 : 0);
|
||||
|
||||
} catch (ParseException e) {
|
||||
// Ignore.
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user