diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-09-08 14:38:32 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-09-08 14:38:32 +0000 |
| commit | 32e1aa1b595609373e817aba6cee0eabe3fe01ae (patch) | |
| tree | 8aa390936f5e75975ea72a068816cfe86ff7bfa2 /src/HttpResponseCommand.cc | |
| parent | bf9fd473bb18531ad01059d9ff7341a23add9f1e (diff) | |
2010-09-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that aria2 reports error and exits with non-zero
status when file is already downloaded.
* src/FtpNegotiationCommand.cc
* src/HttpResponseCommand.cc
* src/RequestGroup.cc
Diffstat (limited to 'src/HttpResponseCommand.cc')
| -rw-r--r-- | src/HttpResponseCommand.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/HttpResponseCommand.cc b/src/HttpResponseCommand.cc index ce300369..9f865d77 100644 --- a/src/HttpResponseCommand.cc +++ b/src/HttpResponseCommand.cc @@ -131,6 +131,9 @@ bool HttpResponseCommand::executeInternal() getFileEntry()->setLength(totalLength); getRequestGroup()->initPieceStorage(); getPieceStorage()->markAllPiecesDone(); + // TODO It would be good to issue ChecksumCheckIntegrity here + // instead of just pretending checksum verification is done. + getDownloadContext()->setChecksumVerified(true); getLogger()->notice(MSG_DOWNLOAD_ALREADY_COMPLETED, util::itos(getRequestGroup()->getGID()).c_str(), getRequestGroup()->getFirstFilePath().c_str()); @@ -265,6 +268,9 @@ bool HttpResponseCommand::handleDefaultEncoding getOption().get())); if(!infoFile->exists() && getRequestGroup()->downloadFinishedByFileLength()) { getPieceStorage()->markAllPiecesDone(); + // TODO It would be good to issue ChecksumCheckIntegrity here + // instead of just pretending checksum verification is done. + getDownloadContext()->setChecksumVerified(true); getLogger()->notice(MSG_DOWNLOAD_ALREADY_COMPLETED, util::itos(getRequestGroup()->getGID()).c_str(), getRequestGroup()->getFirstFilePath().c_str()); @@ -370,6 +376,9 @@ bool HttpResponseCommand::handleOtherEncoding if(getRequestGroup()->downloadFinishedByFileLength()) { getRequestGroup()->initPieceStorage(); getPieceStorage()->markAllPiecesDone(); + // TODO It would be good to issue ChecksumCheckIntegrity here + // instead of just pretending checksum verification is done. + getDownloadContext()->setChecksumVerified(true); getLogger()->notice(MSG_DOWNLOAD_ALREADY_COMPLETED, util::itos(getRequestGroup()->getGID()).c_str(), getRequestGroup()->getFirstFilePath().c_str()); |
