mirror of https://github.com/aria2/aria2
2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Set Request::setKeepAliveHint() and Request::setPipeliningHint() in InitiateConnectionCommandFactory. They should be set only when the protocol is HTTP or HTTPS. * src/InitiateConnectionCommandFactory.cc * src/RequestGroup.ccpull/1/head
parent
b1d51f2442
commit
c3c05e9ab1
|
@ -1,3 +1,11 @@
|
|||
2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Set Request::setKeepAliveHint() and Request::setPipeliningHint()
|
||||
in InitiateConnectionCommandFactory. They should be set only when
|
||||
the protocol is HTTP or HTTPS.
|
||||
* src/InitiateConnectionCommandFactory.cc
|
||||
* src/RequestGroup.cc
|
||||
|
||||
2008-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Fixed infinite loop in checksum checking.
|
||||
|
|
|
@ -40,6 +40,8 @@
|
|||
#include "DownloadEngine.h"
|
||||
#include "DlAbortEx.h"
|
||||
#include "StringFormat.h"
|
||||
#include "Option.h"
|
||||
#include "prefs.h"
|
||||
|
||||
namespace aria2 {
|
||||
|
||||
|
@ -51,6 +53,14 @@ InitiateConnectionCommandFactory::createInitiateConnectionCommand(int32_t cuid,
|
|||
|| req->getProtocol() == "https"
|
||||
#endif // ENABLE_SSL
|
||||
) {
|
||||
|
||||
if(e->option->getAsBool(PREF_ENABLE_HTTP_KEEP_ALIVE)) {
|
||||
req->setKeepAliveHint(true);
|
||||
}
|
||||
if(e->option->getAsBool(PREF_ENABLE_HTTP_PIPELINING)) {
|
||||
req->setPipeliningHint(true);
|
||||
}
|
||||
|
||||
return new HttpInitiateConnectionCommand(cuid, req, requestGroup, e);
|
||||
} else if(req->getProtocol() == "ftp") {
|
||||
return new FtpInitiateConnectionCommand(cuid, req, requestGroup, e);
|
||||
|
|
|
@ -491,13 +491,6 @@ Commands RequestGroup::createNextCommand(DownloadEngine* e, unsigned int numComm
|
|||
req->setReferer(_option->get(PREF_REFERER));
|
||||
req->setMethod(method);
|
||||
|
||||
if(_option->getAsBool(PREF_ENABLE_HTTP_KEEP_ALIVE)) {
|
||||
req->setKeepAliveHint(true);
|
||||
}
|
||||
if(_option->getAsBool(PREF_ENABLE_HTTP_PIPELINING)) {
|
||||
req->setPipeliningHint(true);
|
||||
}
|
||||
|
||||
Command* command = InitiateConnectionCommandFactory::createInitiateConnectionCommand(CUIDCounterSingletonHolder::instance()->newID(), req, this, e);
|
||||
ServerHostHandle sv(new ServerHost(command->getCuid(), req->getHost()));
|
||||
registerServerHost(sv);
|
||||
|
|
Loading…
Reference in New Issue