diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-01 01:59:12 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-01 01:59:12 +0000 |
commit | a189bcea9e57ae22f7e9b0b4dfa77583d12fbae0 (patch) | |
tree | a33055f4970ef1bd35c4317c6fa9d5e9e863fb5d /net/http/partial_data.cc | |
parent | a722d38c7aede45b7addf675d2cc5f86deae3778 (diff) | |
download | chromium_src-a189bcea9e57ae22f7e9b0b4dfa77583d12fbae0.zip chromium_src-a189bcea9e57ae22f7e9b0b4dfa77583d12fbae0.tar.gz chromium_src-a189bcea9e57ae22f7e9b0b4dfa77583d12fbae0.tar.bz2 |
Http cache: Add code to restart a network request when the
server doesn't revalidate a partially stored entry, in other
words, after we issued a conditional byte range request.
BUG=27276, 28850
TEST=unittests
Review URL: http://codereview.chromium.org/452017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33412 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/partial_data.cc')
-rw-r--r-- | net/http/partial_data.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/http/partial_data.cc b/net/http/partial_data.cc index f253dc1..0ef7f6b 100644 --- a/net/http/partial_data.cc +++ b/net/http/partial_data.cc @@ -48,7 +48,9 @@ void PartialData::RestoreHeaders(std::string* headers) const { int64 end = byte_range_.IsSuffixByteRange() ? byte_range_.suffix_length() : byte_range_.last_byte_position(); - AddRangeHeader(current_range_start_, end, headers); + headers->assign(extra_headers_); + if (byte_range_.IsValid()) + AddRangeHeader(current_range_start_, end, headers); } int PartialData::PrepareCacheValidation(disk_cache::Entry* entry, |