summaryrefslogtreecommitdiff
path: root/src/NsCookieParser.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/NsCookieParser.cc')
-rw-r--r--src/NsCookieParser.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/NsCookieParser.cc b/src/NsCookieParser.cc
index e484df8e..77ca25ab 100644
--- a/src/NsCookieParser.cc
+++ b/src/NsCookieParser.cc
@@ -69,9 +69,14 @@ std::unique_ptr<Cookie> parseNsCookie(const std::string& cookieStr,
return nullptr;
}
int64_t expiryTime;
- if (!util::parseLLIntNoThrow(expiryTime,
- std::string(vs[4].first, vs[4].second))) {
- return nullptr;
+ {
+ // chrome extension uses subsecond resolution for expiry time.
+ double expiryTimeDouble;
+ if (!util::parseDoubleNoThrow(expiryTimeDouble,
+ std::string(vs[4].first, vs[4].second))) {
+ return nullptr;
+ }
+ expiryTime = static_cast<int64_t>(expiryTimeDouble);
}
if (std::numeric_limits<time_t>::max() < expiryTime) {
expiryTime = std::numeric_limits<time_t>::max();