From d0ad7033c3e11549529b44990ef022a655877601 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Tue, 12 May 2015 00:21:22 +0900 Subject: sftp: basic download works This commits implements basic downloading feature for sftp URI. This includes segmented downloads, and connection (sftp session) pooling. Download via HTTP proxy has not been implemented yet. --- src/AbstractCommand.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/AbstractCommand.cc') diff --git a/src/AbstractCommand.cc b/src/AbstractCommand.cc index 2df0141b..ba1297bc 100644 --- a/src/AbstractCommand.cc +++ b/src/AbstractCommand.cc @@ -677,7 +677,7 @@ std::string getProxyUri(const std::string& protocol, const Option* option) option); } - if (protocol == "ftp") { + if (protocol == "ftp" || protocol == "sftp") { return getProxyOptionFor (PREF_FTP_PROXY, PREF_FTP_PROXY_USER, PREF_FTP_PROXY_PASSWD, option); } @@ -883,7 +883,8 @@ bool AbstractCommand::checkIfConnectionEstablished const std::string& AbstractCommand::resolveProxyMethod(const std::string& protocol) const { - if (getOption()->get(PREF_PROXY_METHOD) == V_TUNNEL || protocol == "https") { + if (getOption()->get(PREF_PROXY_METHOD) == V_TUNNEL || protocol == "https" || + protocol == "sftp") { return V_TUNNEL; } return V_GET; -- cgit