summaryrefslogtreecommitdiffstats
path: root/net/http/partial_data.cc
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-14 22:05:54 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-14 22:05:54 +0000
commit7eab0d22638954a4539a408c1b44082cb78f7a7d (patch)
tree82c3a82573d5a329c8ac76123e61880f6073c063 /net/http/partial_data.cc
parent1405220aad5d0885a3f583e95d9a96e76455b1c7 (diff)
downloadchromium_src-7eab0d22638954a4539a408c1b44082cb78f7a7d.zip
chromium_src-7eab0d22638954a4539a408c1b44082cb78f7a7d.tar.gz
chromium_src-7eab0d22638954a4539a408c1b44082cb78f7a7d.tar.bz2
Http Cache: More unit tests for byte range support.
BUG=b/2071330 TEST=unittests Review URL: http://codereview.chromium.org/267101 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29035 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/partial_data.cc')
-rw-r--r--net/http/partial_data.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/http/partial_data.cc b/net/http/partial_data.cc
index b61d9be..57985e7 100644
--- a/net/http/partial_data.cc
+++ b/net/http/partial_data.cc
@@ -192,6 +192,10 @@ bool PartialData::ResponseHeadersOK(const HttpResponseHeaders* headers) {
if (total_length <= 0)
return false;
+ int64 content_length = headers->GetContentLength();
+ if (content_length != end - start + 1)
+ return false;
+
if (!resource_size_) {
// First response. Update our values with the ones provided by the server.
resource_size_ = total_length;