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

Unified Diff: net/http/http_cache.cc

Issue 18533: Merge r5767 - Protect cookie headers from XHR... (Closed) Base URL: svn://chrome-svn/chrome/branches/release_154.next/src/
Patch Set: Created 11 years, 11 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
« no previous file with comments | « chrome/common/render_messages.h ('k') | net/http/http_response_headers.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_cache.cc
===================================================================
--- net/http/http_cache.cc (revision 8522)
+++ net/http/http_cache.cc (working copy)
@@ -1080,8 +1080,19 @@
pickle.WriteInt64(response_info->request_time.ToInternalValue());
pickle.WriteInt64(response_info->response_time.ToInternalValue());
- response_info->headers->Persist(&pickle, skip_transient_headers);
+ net::HttpResponseHeaders::PersistOptions persist_options =
+ net::HttpResponseHeaders::PERSIST_RAW;
+ if (skip_transient_headers) {
+ persist_options =
+ net::HttpResponseHeaders::PERSIST_SANS_COOKIES |
+ net::HttpResponseHeaders::PERSIST_SANS_CHALLENGES |
+ net::HttpResponseHeaders::PERSIST_SANS_HOP_BY_HOP |
+ net::HttpResponseHeaders::PERSIST_SANS_NON_CACHEABLE;
+ }
+
+ response_info->headers->Persist(&pickle, persist_options);
+
if (response_info->ssl_info.cert) {
response_info->ssl_info.cert->Persist(&pickle);
pickle.WriteInt(response_info->ssl_info.cert_status);
« no previous file with comments | « chrome/common/render_messages.h ('k') | net/http/http_response_headers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698