Index: net/http/http_cache_transaction.cc |
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc |
index 450cc450eebc45ce14a61c59e0b4b301202c4f1b..db3f4968911b47ec29167190cf429a69007e00d7 100644 |
--- a/net/http/http_cache_transaction.cc |
+++ b/net/http/http_cache_transaction.cc |
@@ -1875,7 +1875,7 @@ int HttpCache::Transaction::DoCacheWriteDataComplete(int result) { |
// We want to ignore errors writing to disk and just keep reading from |
// the network. |
result = write_len_; |
- } else if (!done_reading_ && entry_) { |
+ } else if (!done_reading_ && entry_ && (!partial_ || truncated_)) { |
asanka
2015/09/17 14:43:34
I'll note that this change doesn't affect the newl
rvargas (doing something else)
2015/09/17 20:18:37
These tests are actually a regression test for htt
|
int current_size = entry_->disk_entry->GetDataSize(kResponseContentIndex); |
int64 body_size = response_.headers->GetContentLength(); |
if (body_size >= 0 && body_size <= current_size) |