Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Unified Diff: net/tools/dump_cache/cache_dumper.cc

Issue 197016: Http Cache: Add support for resuming downloading a... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/partial_data.cc ('k') | net/url_request/url_request_view_cache_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/dump_cache/cache_dumper.cc
===================================================================
--- net/tools/dump_cache/cache_dumper.cc (revision 25542)
+++ net/tools/dump_cache/cache_dumper.cc (working copy)
@@ -139,10 +139,15 @@
int len;
if (index == 0) { // Stream 0 is the headers.
net::HttpResponseInfo response_info;
+ bool truncated;
if (!net::HttpCache::ParseResponseInfo(buf->data(), buf_len,
- &response_info))
+ &response_info, &truncated))
return false;
+ // Skip this entry if it was truncated (results in an empty file).
+ if (truncated)
+ return true;
+
// Remove the size headers.
response_info.headers->RemoveHeader("transfer-encoding");
response_info.headers->RemoveHeader("content-length");
« no previous file with comments | « net/http/partial_data.cc ('k') | net/url_request/url_request_view_cache_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698