diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2007-06-09 10:37:17 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2007-06-09 10:37:17 +0000 |
| commit | aa7cbf60ba1a76877366c977b24fdaf6657a883a (patch) | |
| tree | ef90d38c873144d4eb72b1319f13405f2c2682a4 /src | |
| parent | 2d522cf6b7be0a4e58d2111ed9f939d6e3019582 (diff) | |
Diffstat (limited to 'src')
| -rw-r--r-- | src/DownloadCommand.cc | 1 | ||||
| -rw-r--r-- | src/HttpResponseCommand.cc | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/DownloadCommand.cc b/src/DownloadCommand.cc index 2e488ee9..6914ee24 100644 --- a/src/DownloadCommand.cc +++ b/src/DownloadCommand.cc @@ -129,6 +129,7 @@ bool DownloadCommand::prepareForNextSegment() { if(!_requestGroup->getChecksum().isNull() && !_requestGroup->getChecksum()->isEmpty()) { ChecksumCommand* command = new ChecksumCommand(cuid, _requestGroup, e); + command->initValidator(); e->commands.push_back(command); } return true; diff --git a/src/HttpResponseCommand.cc b/src/HttpResponseCommand.cc index 99b37971..87abc5a9 100644 --- a/src/HttpResponseCommand.cc +++ b/src/HttpResponseCommand.cc @@ -99,6 +99,7 @@ bool HttpResponseCommand::executeInternal() _requestGroup->validateFilenameByHint(httpResponse->determinFilename()); _requestGroup->validateTotalLengthByHint(httpResponse->getEntityLength()); + _requestGroup->getSegmentMan()->filename = httpResponse->determinFilename(); if(e->_requestGroupMan->isSameFileBeingDownloaded(_requestGroup)) { throw new FatalException(EX_DUPLICATE_FILE_DOWNLOAD, _requestGroup->getFilePath().c_str()); } @@ -123,7 +124,6 @@ bool HttpResponseCommand::handleDefaultEncoding(const HttpResponseHandle& httpRe throw new DlAbortEx(EX_TOO_LARGE_FILE, size); } _requestGroup->getSegmentMan()->isSplittable = !(size == 0); - _requestGroup->getSegmentMan()->filename = httpResponse->determinFilename(); _requestGroup->getSegmentMan()->downloadStarted = true; _requestGroup->getSegmentMan()->totalSize = size; @@ -157,7 +157,6 @@ bool HttpResponseCommand::handleOtherEncoding(const HttpResponseHandle& httpResp // we ignore content-length when transfer-encoding is set _requestGroup->getSegmentMan()->downloadStarted = true; _requestGroup->getSegmentMan()->isSplittable = false; - _requestGroup->getSegmentMan()->filename = httpResponse->determinFilename(); _requestGroup->getSegmentMan()->totalSize = 0; // quick hack for method 'head' if(httpRequest->getMethod() == Request::METHOD_HEAD) { |
