mirror of https://github.com/aria2/aria2
2007-12-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug#1841757: aria2 will connect to server to only get file size. * src/StreamFileAllocationEntry.cc * src/option_processing.cc * src/HttpResponseCommand.cc: Now reuse connection in segmented downloads. * src/FtpNegotiationCommand.cc Suppressed wrong message when finding PreDownloadHandler * src/RequestGroup.ccpull/1/head
parent
23a41fba06
commit
d56dddd553
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,16 @@
|
||||||
|
2007-12-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
|
Fixed the bug#1841757: aria2 will connect to server to only get
|
||||||
|
file size.
|
||||||
|
* src/StreamFileAllocationEntry.cc
|
||||||
|
* src/option_processing.cc
|
||||||
|
* src/HttpResponseCommand.cc: Now reuse connection in segmented
|
||||||
|
downloads.
|
||||||
|
* src/FtpNegotiationCommand.cc
|
||||||
|
|
||||||
|
Suppressed wrong message when finding PreDownloadHandler
|
||||||
|
* src/RequestGroup.cc
|
||||||
|
|
||||||
2007-11-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
2007-11-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
Updated usage
|
Updated usage
|
||||||
|
@ -20,7 +33,7 @@
|
||||||
* test/MetaFileUtilTest.cc
|
* test/MetaFileUtilTest.cc
|
||||||
* test/PStringBuildVisitorTest.cc
|
* test/PStringBuildVisitorTest.cc
|
||||||
|
|
||||||
Fixed bug: --check-integrity dones't work for multi file torrent.
|
Fixed bug: --check-integrity doesn't work for multi file torrent.
|
||||||
* src/RequestGroup.cc
|
* src/RequestGroup.cc
|
||||||
* src/BtCheckIntegrityEntry.cc
|
* src/BtCheckIntegrityEntry.cc
|
||||||
|
|
||||||
|
|
|
@ -76,8 +76,15 @@ bool FtpNegotiationCommand::executeInternal() {
|
||||||
command->setLowestDownloadSpeedLimit(e->option->getAsInt(PREF_LOWEST_SPEED_LIMIT));
|
command->setLowestDownloadSpeedLimit(e->option->getAsInt(PREF_LOWEST_SPEED_LIMIT));
|
||||||
e->commands.push_back(command);
|
e->commands.push_back(command);
|
||||||
return true;
|
return true;
|
||||||
} else if(sequence == SEQ_HEAD_OK || sequence == SEQ_DOWNLOAD_ALREADY_COMPLETED || sequence == SEQ_FILE_PREPARATION) {
|
} else if(sequence == SEQ_HEAD_OK || sequence == SEQ_DOWNLOAD_ALREADY_COMPLETED) {
|
||||||
return true;
|
return true;
|
||||||
|
} else if(sequence == SEQ_FILE_PREPARATION) {
|
||||||
|
if(e->option->get(PREF_FTP_PASV) == V_TRUE) {
|
||||||
|
sequence = SEQ_SEND_PASV;
|
||||||
|
} else {
|
||||||
|
sequence = SEQ_SEND_PORT;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
} else {
|
} else {
|
||||||
e->commands.push_back(this);
|
e->commands.push_back(this);
|
||||||
return false;
|
return false;
|
||||||
|
@ -228,10 +235,14 @@ bool FtpNegotiationCommand::recvSize() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
_requestGroup->loadAndOpenFile(infoFile);
|
_requestGroup->loadAndOpenFile(infoFile);
|
||||||
prepareForNextAction();
|
|
||||||
|
prepareForNextAction(this);
|
||||||
|
|
||||||
sequence = SEQ_FILE_PREPARATION;
|
sequence = SEQ_FILE_PREPARATION;
|
||||||
e->noWait = true;
|
disableReadCheckSocket();
|
||||||
|
setWriteCheckSocket(dataSocket);
|
||||||
|
|
||||||
|
//e->noWait = true;
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
_requestGroup->validateTotalLength(size);
|
_requestGroup->validateTotalLength(size);
|
||||||
|
|
|
@ -132,7 +132,9 @@ bool HttpResponseCommand::handleDefaultEncoding(const HttpResponseHandle& httpRe
|
||||||
try {
|
try {
|
||||||
_requestGroup->loadAndOpenFile(infoFile);
|
_requestGroup->loadAndOpenFile(infoFile);
|
||||||
File file(_requestGroup->getFilePath());
|
File file(_requestGroup->getFilePath());
|
||||||
if(_requestGroup->getRemainingUris().empty() && !file.exists()) {
|
|
||||||
|
SegmentHandle segment = _requestGroup->getSegmentMan()->getSegment(cuid, 0);
|
||||||
|
if(!segment.isNull() && segment->getPositionToWrite() == 0) {
|
||||||
command = createHttpDownloadCommand(httpResponse);
|
command = createHttpDownloadCommand(httpResponse);
|
||||||
}
|
}
|
||||||
prepareForNextAction(command);
|
prepareForNextAction(command);
|
||||||
|
|
|
@ -566,7 +566,7 @@ void RequestGroup::preDownloadProcessing()
|
||||||
itr != _preDownloadHandlers.end(); ++itr) {
|
itr != _preDownloadHandlers.end(); ++itr) {
|
||||||
if((*itr)->canHandle(this)) {
|
if((*itr)->canHandle(this)) {
|
||||||
(*itr)->execute(this);
|
(*itr)->execute(this);
|
||||||
break;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch(RecoverableException* ex) {
|
} catch(RecoverableException* ex) {
|
||||||
|
|
|
@ -57,6 +57,9 @@ Commands StreamFileAllocationEntry::prepareForNextAction(DownloadEngine* e)
|
||||||
if(_timer.difference() <= e->option->getAsInt(PREF_DIRECT_DOWNLOAD_TIMEOUT) &&
|
if(_timer.difference() <= e->option->getAsInt(PREF_DIRECT_DOWNLOAD_TIMEOUT) &&
|
||||||
_nextCommand) {
|
_nextCommand) {
|
||||||
commands.push_back(popNextCommand());
|
commands.push_back(popNextCommand());
|
||||||
|
// try remaining uris
|
||||||
|
Commands streamCommands = _requestGroup->createNextCommandWithAdj(e, -1);
|
||||||
|
copy(streamCommands.begin(), streamCommands.end(), back_inserter(commands));
|
||||||
} else {
|
} else {
|
||||||
if(_currentRequest.isNull()) {
|
if(_currentRequest.isNull()) {
|
||||||
commands = _requestGroup->createNextCommandWithAdj(e, 0);
|
commands = _requestGroup->createNextCommandWithAdj(e, 0);
|
||||||
|
|
|
@ -118,7 +118,7 @@ Option* option_processing(int argc, char* const argv[])
|
||||||
op->put(PREF_USER_AGENT, "aria2");
|
op->put(PREF_USER_AGENT, "aria2");
|
||||||
op->put(PREF_NO_NETRC, V_FALSE);
|
op->put(PREF_NO_NETRC, V_FALSE);
|
||||||
op->put(PREF_MAX_CONCURRENT_DOWNLOADS, "5");
|
op->put(PREF_MAX_CONCURRENT_DOWNLOADS, "5");
|
||||||
op->put(PREF_DIRECT_DOWNLOAD_TIMEOUT, "15");
|
op->put(PREF_DIRECT_DOWNLOAD_TIMEOUT, "300");
|
||||||
op->put(PREF_FORCE_SEQUENTIAL, V_FALSE);
|
op->put(PREF_FORCE_SEQUENTIAL, V_FALSE);
|
||||||
op->put(PREF_AUTO_FILE_RENAMING, V_TRUE);
|
op->put(PREF_AUTO_FILE_RENAMING, V_TRUE);
|
||||||
op->put(PREF_PARAMETERIZED_URI, V_FALSE);
|
op->put(PREF_PARAMETERIZED_URI, V_FALSE);
|
||||||
|
|
Loading…
Reference in New Issue