diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-05-08 13:20:15 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-05-08 13:20:15 +0000 |
| commit | 5ea933fed14e6722cff0759c01a9ab496bfeeb9a (patch) | |
| tree | 5a2e999e87cc4ba12ba8df97eec8478face89bdc /src | |
| parent | 2c54667beb2b05fe20a51f5e89fa3cb5e7d515f6 (diff) | |
2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Set _supportsPersistentConnection to true by default.
* src/Request.cc
* src/RequestGroup.cc
* test/HttpRequestTest.cc
* test/RequestTest.cc
Diffstat (limited to 'src')
| -rw-r--r-- | src/Request.cc | 4 | ||||
| -rw-r--r-- | src/RequestGroup.cc | 8 |
2 files changed, 2 insertions, 10 deletions
diff --git a/src/Request.cc b/src/Request.cc index cc9c7c94..c34e7855 100644 --- a/src/Request.cc +++ b/src/Request.cc @@ -49,7 +49,7 @@ const std::string Request::METHOD_HEAD = "HEAD"; Request::Request(): port(0), tryCount(0), - _supportsPersistentConnection(false), + _supportsPersistentConnection(true), _keepAliveHint(false), _pipeliningHint(false), method(METHOD_GET), @@ -70,7 +70,7 @@ bool Request::resetUrl() { bool Request::redirectUrl(const std::string& url) { previousUrl = ""; - _supportsPersistentConnection = false; + _supportsPersistentConnection = true; return parseUrl(url); } diff --git a/src/RequestGroup.cc b/src/RequestGroup.cc index 04dffaa9..c3b03cca 100644 --- a/src/RequestGroup.cc +++ b/src/RequestGroup.cc @@ -498,14 +498,6 @@ Commands RequestGroup::createNextCommand(DownloadEngine* e, unsigned int numComm req->setPipeliningHint(true); } - if(req->getProtocol() == "http" || req->getProtocol() == "https") { - // we set supportsPersistentConnection true here. When HTTP response - // is returned and it turns out that the remote server doesn't - // support persistent connection, then this value will be set to - // false. - req->supportsPersistentConnection(true); - } - Command* command = InitiateConnectionCommandFactory::createInitiateConnectionCommand(CUIDCounterSingletonHolder::instance()->newID(), req, this, e); ServerHostHandle sv(new ServerHost(command->getCuid(), req->getHost())); registerServerHost(sv); |
