summaryrefslogtreecommitdiffstats
path: root/net/http/partial_data.cc
diff options
context:
space:
mode:
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;