Bug 395539 - FTP TransportStatus's progressMax reports the full file size for REST retrieval (resuming partial download). Patch by Edward Lee <edilee@gmail.com>. r=cbiesinger, sr=cbiesinger, a=bzbarsky

This commit is contained in:
sdwilsh@shawnwilsher.com 2007-09-17 13:35:11 -07:00
parent 39140a67fc
commit 04b8be39d6

View File

@ -1907,8 +1907,10 @@ nsFtpState::OnTransportStatus(nsITransport *transport, nsresult status,
}
// Ignore the progressMax value from the socket. We know the true size of
// the file based on the response from our SIZE request.
mChannel->OnTransportStatus(nsnull, status, progress, mFileSize);
// the file based on the response from our SIZE request. Additionally, only
// report the max progress based on where we started/resumed.
mChannel->OnTransportStatus(nsnull, status, progress,
mFileSize - mChannel->StartPos());
return NS_OK;
}