Index: webkit/glue/weburlloader_impl.cc |
diff --git a/webkit/glue/weburlloader_impl.cc b/webkit/glue/weburlloader_impl.cc |
index 7b4ec9b79f564571687f4697015ead4f85ba40e7..88f4565009836ff076de2bda56ad43d4addd2eea 100644 |
--- a/webkit/glue/weburlloader_impl.cc |
+++ b/webkit/glue/weburlloader_impl.cc |
@@ -592,7 +592,7 @@ void WebURLLoaderImpl::Context::OnReceivedCachedMetadata( |
} |
void WebURLLoaderImpl::Context::OnCompletedRequest( |
- const net::URLRequestStatus& status, |
+ const net::URLRequestStatus& original_status, |
const std::string& security_info, |
const base::Time& completion_time) { |
if (ftp_listing_delegate_.get()) { |
@@ -603,6 +603,14 @@ void WebURLLoaderImpl::Context::OnCompletedRequest( |
multipart_delegate_.reset(NULL); |
} |
+ net::URLRequestStatus status = original_status; |
darin (slow to review)
2011/11/08 23:30:53
what's the justification for doing this fixup at t
cbentzel
2011/11/09 01:26:09
We could potentially move this up to AsyncResource
|
+ |
+ // Rewrite the Content-Length mismatch as a success. |
+ // See crbug.com/52847 for justification. |
+ if (status.status() != net::URLRequestStatus::SUCCESS && |
+ status.error() == net::ERR_CONTENT_LENGTH_MISMATCH) |
+ status.set_status(net::URLRequestStatus::SUCCESS); |
+ |
// Prevent any further IPC to the browser now that we're complete, but |
// don't delete it to keep any downloaded temp files alive. |
DCHECK(!completed_bridge_.get()); |