summaryrefslogtreecommitdiff
path: root/src/FtpTunnelResponseCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-05-12 00:32:08 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-05-12 00:32:30 +0900
commit21c328fc113d28f3bbb1b1d74b53e4e2a36c4e9d (patch)
tree3b3f92d2031d452e3b24e430112a18eab3ac833a /src/FtpTunnelResponseCommand.cc
parentd0ad7033c3e11549529b44990ef022a655877601 (diff)
sftp: Make sftp works through HTTP proxy
Diffstat (limited to 'src/FtpTunnelResponseCommand.cc')
-rw-r--r--src/FtpTunnelResponseCommand.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/FtpTunnelResponseCommand.cc b/src/FtpTunnelResponseCommand.cc
index ed626f0d..9283e75e 100644
--- a/src/FtpTunnelResponseCommand.cc
+++ b/src/FtpTunnelResponseCommand.cc
@@ -40,6 +40,7 @@
#include "Segment.h"
#include "SocketCore.h"
#include "SocketRecvBuffer.h"
+#include "SftpNegotiationCommand.h"
namespace aria2 {
@@ -59,6 +60,13 @@ FtpTunnelResponseCommand::~FtpTunnelResponseCommand() {}
std::unique_ptr<Command> FtpTunnelResponseCommand::getNextCommand()
{
+ if (getRequest()->getProtocol() == "sftp") {
+ return make_unique<SftpNegotiationCommand>
+ (getCuid(), getRequest(), getFileEntry(),
+ getRequestGroup(), getDownloadEngine(),
+ getSocket());
+ }
+
return make_unique<FtpNegotiationCommand>
(getCuid(), getRequest(), getFileEntry(),
getRequestGroup(), getDownloadEngine(),