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

Side by Side Diff: net/http/http_cache.cc

Issue 11264: Drop Set-Cookie from XHR response headers (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 12 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/render_messages.h ('k') | net/http/http_response_headers.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/http/http_cache.h" 5 #include "net/http/http_cache.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 if (response_info->ssl_info.security_bits != -1) 1068 if (response_info->ssl_info.security_bits != -1)
1069 flags |= RESPONSE_INFO_HAS_SECURITY_BITS; 1069 flags |= RESPONSE_INFO_HAS_SECURITY_BITS;
1070 if (response_info->vary_data.is_valid()) 1070 if (response_info->vary_data.is_valid())
1071 flags |= RESPONSE_INFO_HAS_VARY_DATA; 1071 flags |= RESPONSE_INFO_HAS_VARY_DATA;
1072 1072
1073 Pickle pickle; 1073 Pickle pickle;
1074 pickle.WriteInt(flags); 1074 pickle.WriteInt(flags);
1075 pickle.WriteInt64(response_info->request_time.ToInternalValue()); 1075 pickle.WriteInt64(response_info->request_time.ToInternalValue());
1076 pickle.WriteInt64(response_info->response_time.ToInternalValue()); 1076 pickle.WriteInt64(response_info->response_time.ToInternalValue());
1077 1077
1078 response_info->headers->Persist(&pickle, skip_transient_headers); 1078 net::HttpResponseHeaders::PersistOptions persist_options =
1079 net::HttpResponseHeaders::PERSIST_RAW;
1080
1081 if (skip_transient_headers) {
1082 persist_options =
1083 net::HttpResponseHeaders::PERSIST_SANS_COOKIES |
1084 net::HttpResponseHeaders::PERSIST_SANS_CHALLENGES |
1085 net::HttpResponseHeaders::PERSIST_SANS_HOP_BY_HOP |
1086 net::HttpResponseHeaders::PERSIST_SANS_NON_CACHEABLE;
1087 }
1088
1089 response_info->headers->Persist(&pickle, persist_options);
1079 1090
1080 if (response_info->ssl_info.cert) { 1091 if (response_info->ssl_info.cert) {
1081 response_info->ssl_info.cert->Persist(&pickle); 1092 response_info->ssl_info.cert->Persist(&pickle);
1082 pickle.WriteInt(response_info->ssl_info.cert_status); 1093 pickle.WriteInt(response_info->ssl_info.cert_status);
1083 } 1094 }
1084 if (response_info->ssl_info.security_bits != -1) 1095 if (response_info->ssl_info.security_bits != -1)
1085 pickle.WriteInt(response_info->ssl_info.security_bits); 1096 pickle.WriteInt(response_info->ssl_info.security_bits);
1086 1097
1087 if (response_info->vary_data.is_valid()) 1098 if (response_info->vary_data.is_valid())
1088 response_info->vary_data.Persist(&pickle); 1099 response_info->vary_data.Persist(&pickle);
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
1322 1333
1323 entry->pending_queue.erase(entry->pending_queue.begin()); 1334 entry->pending_queue.erase(entry->pending_queue.begin());
1324 1335
1325 AddTransactionToEntry(entry, next); 1336 AddTransactionToEntry(entry, next);
1326 } 1337 }
1327 1338
1328 //----------------------------------------------------------------------------- 1339 //-----------------------------------------------------------------------------
1329 1340
1330 } // namespace net 1341 } // namespace net
1331 1342
OLDNEW
« 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