| Index: content/browser/download/download_file_impl.cc
|
| diff --git a/content/browser/download/download_file_impl.cc b/content/browser/download/download_file_impl.cc
|
| index 13ce1604c49dba528a3f28329792b057b0ed7921..edde01e1bc0c42f0cf088cbc103c3a17e36cd7fd 100644
|
| --- a/content/browser/download/download_file_impl.cc
|
| +++ b/content/browser/download/download_file_impl.cc
|
| @@ -441,9 +441,19 @@ void DownloadFileImpl::StreamActive(SourceStream* source_stream) {
|
| break;
|
| case ByteStreamReader::STREAM_COMPLETE:
|
| {
|
| - reason = static_cast<DownloadInterruptReason>(
|
| + reason = static_cast<DownloadInterruptReason>(
|
| source_stream->stream_reader()->GetStatus());
|
| - SendUpdate();
|
| + if (source_stream->length() == DownloadSaveInfo::kLengthFullContent &&
|
| + !received_slices_.empty() &&
|
| + (source_stream->offset() == received_slices_.back().offset +
|
| + received_slices_.back().received_bytes) &&
|
| + reason == DownloadInterruptReason::
|
| + DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE) {
|
| + // We are probably reaching the end of the stream, don't treat this
|
| + // as an error.
|
| + reason = DOWNLOAD_INTERRUPT_REASON_NONE;
|
| + }
|
| + SendUpdate();
|
| }
|
| break;
|
| default:
|
|
|