summaryrefslogtreecommitdiff
path: root/src/HttpInitiateConnectionCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-10-17 16:26:51 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-10-17 16:26:51 +0000
commit884a139e725f4c3968929dca734eef6812cf2e6f (patch)
tree725212a598e43041bca09a082da1cf1cd6e7c8e6 /src/HttpInitiateConnectionCommand.cc
parent343228629a69870cf47640a63e32f7b237403aa5 (diff)
2007-10-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added HTTP/1.1 keep alive and pipelining support. See --enable-http-keep-alive and --enable-http-pipelining option. * src/AbstractCommand.{h, cc}: Now it has one-to-many relation to Segment. * src/HttpDownloadCommand.{h, cc} * src/OptionHandlerFactory.cc * src/HttpConnection.{h, cc} * src/version_usage.cc * src/HttpInitiateConnectionCommand.cc * src/FtpInitiateConnectionCommand.cc * src/Segment.h * src/HttpRequestCommand.{h, cc} * src/option_processing.cc * src/prefs.h * src/HttpResponseCommand.cc * src/SegmentMan.{h, cc} * src/FtpNegotiateCommand.cc * src/HttpProxyResponseCommand.cc * src/Request.cc * src/HttpRequest.cc * src/DownloadCommand.cc * test/HttpRequestTest.cc * test/RequestTest.cc
Diffstat (limited to 'src/HttpInitiateConnectionCommand.cc')
-rw-r--r--src/HttpInitiateConnectionCommand.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/HttpInitiateConnectionCommand.cc b/src/HttpInitiateConnectionCommand.cc
index a3680eb2..ece0b01f 100644
--- a/src/HttpInitiateConnectionCommand.cc
+++ b/src/HttpInitiateConnectionCommand.cc
@@ -44,6 +44,7 @@
#include "DlRetryEx.h"
#include "message.h"
#include "prefs.h"
+#include "HttpConnection.h"
HttpInitiateConnectionCommand::HttpInitiateConnectionCommand(int cuid,
const RequestHandle& req,
@@ -88,7 +89,7 @@ bool HttpInitiateConnectionCommand::executeInternal() {
if(useProxyTunnel()) {
command = new HttpProxyRequestCommand(cuid, req, _requestGroup, e, socket);
} else if(useProxyGet()) {
- command = new HttpRequestCommand(cuid, req, _requestGroup, e, socket);
+ command = new HttpRequestCommand(cuid, req, _requestGroup, new HttpConnection(cuid, socket, e->option), e, socket);
} else {
// TODO
throw new DlAbortEx("ERROR");
@@ -97,7 +98,7 @@ bool HttpInitiateConnectionCommand::executeInternal() {
logger->info(MSG_CONNECTING_TO_SERVER, cuid, req->getHost().c_str(),
req->getPort());
socket->establishConnection(hostname, req->getPort());
- command = new HttpRequestCommand(cuid, req, _requestGroup, e, socket);
+ command = new HttpRequestCommand(cuid, req, _requestGroup, new HttpConnection(cuid, socket, e->option), e, socket);
}
e->commands.push_back(command);
return true;