summaryrefslogtreecommitdiff
path: root/src/HttpRequestCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-05-20 13:51:52 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-05-20 13:51:52 +0000
commiteaf2d53a91d4019683bc6caf25c5a143f88a84b4 (patch)
tree91137d789cdaa42221017a52346befb406c3addf /src/HttpRequestCommand.cc
parentdd37b7be0aa5d818636530bc60f894893fd8f7a4 (diff)
2007-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* Added the simultaneous download feature.
Diffstat (limited to 'src/HttpRequestCommand.cc')
-rw-r--r--src/HttpRequestCommand.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/HttpRequestCommand.cc b/src/HttpRequestCommand.cc
index 13cf35af..b708dfd0 100644
--- a/src/HttpRequestCommand.cc
+++ b/src/HttpRequestCommand.cc
@@ -39,9 +39,10 @@
HttpRequestCommand::HttpRequestCommand(int cuid,
const RequestHandle& req,
+ RequestGroup* requestGroup,
DownloadEngine* e,
const SocketHandle& s)
- :AbstractCommand(cuid, req, e, s) {
+ :AbstractCommand(cuid, req, requestGroup, e, s) {
disableReadCheckSocket();
setWriteCheckSocket(socket);
}
@@ -60,14 +61,14 @@ bool HttpRequestCommand::executeInternal() {
httpRequest->setUserAgent(e->option->get(PREF_USER_AGENT));
httpRequest->setRequest(req);
httpRequest->setSegment(segment);
- httpRequest->setEntityLength(e->segmentMan->totalSize);
+ httpRequest->setEntityLength(_requestGroup->getSegmentMan()->totalSize);
httpRequest->configure(e->option);
HttpConnectionHandle httpConnection = new HttpConnection(cuid, socket, e->option);
httpConnection->sendRequest(httpRequest);
- Command* command = new HttpResponseCommand(cuid, req, httpConnection, e, socket);
+ Command* command = new HttpResponseCommand(cuid, req, _requestGroup, httpConnection, e, socket);
e->commands.push_back(command);
return true;
}