Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Unified Diff: net/url_request/url_request_http_job.cc

Issue 11339032: Account for server vs host clock skew in cookie expiration times. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add 152078 specific test case Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/url_request/url_request_http_job.cc
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index aab892f3a60368dd69784e916d0106cb8dd4f181..8d69c238a6f2db39128b9c622225f0252dcb095d 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -566,6 +566,9 @@ void URLRequestHttpJob::SaveCookiesAndNotifyHeadersComplete(int result) {
FetchResponseCookies(&response_cookies_);
+ if (!GetResponseHeaders()->GetDateValue(&response_date_))
+ response_date_ = base::Time();
+
// Now, loop over the response cookies, and attempt to persist each.
SaveNextCookie();
}
@@ -592,6 +595,7 @@ void URLRequestHttpJob::SaveNextCookie() {
response_cookies_.size() > 0) {
CookieOptions options;
options.set_include_httponly();
+ options.set_server_time(response_date_);
net::CookieStore::SetCookiesCallback callback(
base::Bind(&URLRequestHttpJob::OnCookieSaved,

Powered by Google App Engine
This is Rietveld 408576698