summaryrefslogtreecommitdiffstats
path: root/net/http/partial_data.cc
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-18 21:57:35 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-18 21:57:35 +0000
commit39d4a0984353dd3698b44e411dc82423d8a7c33e (patch)
treeb1f3d658bf726f7593b8865bf233387eed36dc92 /net/http/partial_data.cc
parent2a9f248416fa4d1d7c1f0e5830785db4d98a72b7 (diff)
downloadchromium_src-39d4a0984353dd3698b44e411dc82423d8a7c33e.zip
chromium_src-39d4a0984353dd3698b44e411dc82423d8a7c33e.tar.gz
chromium_src-39d4a0984353dd3698b44e411dc82423d8a7c33e.tar.bz2
Http cache: Make sure that we don't use http 1.1 features
for http 1.0 resources. BUG=74061 TEST=netunittests Review URL: http://codereview.chromium.org/6995010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85821 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/partial_data.cc')
-rw-r--r--net/http/partial_data.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/http/partial_data.cc b/net/http/partial_data.cc
index d76d689..f991a95 100644
--- a/net/http/partial_data.cc
+++ b/net/http/partial_data.cc
@@ -240,6 +240,9 @@ bool PartialData::UpdateFromStoredHeaders(const HttpResponseHeaders* headers,
disk_cache::Entry* entry,
bool truncated) {
resource_size_ = 0;
+ if (!headers->HasStrongValidators())
+ return false;
+
if (truncated) {
DCHECK_EQ(headers->response_code(), 200);
// We don't have the real length and the user may be trying to create a
@@ -250,7 +253,7 @@ bool PartialData::UpdateFromStoredHeaders(const HttpResponseHeaders* headers,
// Now we avoid resume if there is no content length, but that was not
// always the case so double check here.
int64 total_length = headers->GetContentLength();
- if (total_length <= 0 || !headers->HasStrongValidators())
+ if (total_length <= 0)
return false;
truncated_ = true;