summaryrefslogtreecommitdiffstats
path: root/net/http/http_cache.cc
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-03 00:04:20 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-03 00:04:20 +0000
commite75e8afa0cf126ca22e403874a22249d51b86219 (patch)
treeecaf299653c89555d53af5f3d6af91119be7f902 /net/http/http_cache.cc
parent60507b1cedf0d19b1a5d9034abb2eb25a2432439 (diff)
downloadchromium_src-e75e8afa0cf126ca22e403874a22249d51b86219.zip
chromium_src-e75e8afa0cf126ca22e403874a22249d51b86219.tar.gz
chromium_src-e75e8afa0cf126ca22e403874a22249d51b86219.tar.bz2
Http cache: Always preserve extra headers when dealing with
byte range requests. BUG=25755 TEST=unittests Review URL: http://codereview.chromium.org/339088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30773 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_cache.cc')
-rw-r--r--net/http/http_cache.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc
index 230b224..0c3783d 100644
--- a/net/http/http_cache.cc
+++ b/net/http/http_cache.cc
@@ -843,12 +843,13 @@ void HttpCache::Transaction::SetRequest(LoadLog* load_log,
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 @@ int HttpCache::Transaction::BeginPartialCacheValidation() {
} 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();