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

Unified Diff: net/http/http_cache.cc

Issue 339088: Http cache: Always preserve extra headers when dealing with... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/http/http_cache_unittest.cc » ('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 30754)
+++ net/http/http_cache.cc (working copy)
@@ -843,12 +843,13 @@
if (range_found && !(effective_load_flags_ & LOAD_DISABLE_CACHE)) {
partial_.reset(new PartialData);
- if (partial_->Init(request_->extra_headers, new_extra_headers)) {
+ if (partial_->Init(request_->extra_headers)) {
// We will be modifying the actual range requested to the server, so
// let's remove the header here.
custom_request_.reset(new HttpRequestInfo(*request_));
request_ = custom_request_.get();
custom_request_->extra_headers = new_extra_headers;
+ partial_->SetHeaders(new_extra_headers);
} else {
// The range is invalid or we cannot handle it properly.
LOG(WARNING) << "Invalid byte range found.";
@@ -946,6 +947,7 @@
} else {
// The request is not for a range, but we have stored just ranges.
partial_.reset(new PartialData());
+ partial_->SetHeaders(request_->extra_headers);
if (!custom_request_.get()) {
custom_request_.reset(new HttpRequestInfo(*request_));
request_ = custom_request_.get();
« no previous file with comments | « no previous file | net/http/http_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698