summaryrefslogtreecommitdiff
path: root/src/HttpRequestCommand.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/HttpRequestCommand.cc')
-rw-r--r--src/HttpRequestCommand.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/HttpRequestCommand.cc b/src/HttpRequestCommand.cc
index 42090bef..84439b6b 100644
--- a/src/HttpRequestCommand.cc
+++ b/src/HttpRequestCommand.cc
@@ -21,9 +21,6 @@
/* copyright --> */
#include "HttpRequestCommand.h"
#include "HttpResponseCommand.h"
-#include "HttpInitiateConnectionCommand.h"
-#include "Socket.h"
-#include "Util.h"
#include "HttpConnection.h"
HttpRequestCommand::HttpRequestCommand(int cuid, Request* req, DownloadEngine* e, Socket* s):AbstractCommand(cuid, req, e, s) {
@@ -43,7 +40,11 @@ bool HttpRequestCommand::executeInternal(Segment seg) {
req->seg = seg;
http.sendRequest(seg);
- HttpResponseCommand* command = new HttpResponseCommand(cuid, req, e, socket);
+ Command* command = getNextCommand();
e->commands.push(command);
return true;
}
+
+Command* HttpRequestCommand::getNextCommand() const {
+ return new HttpResponseCommand(cuid, req, e, socket);
+}