summaryrefslogtreecommitdiff
path: root/src/AbstractCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-05-12 00:21:22 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-05-12 00:31:57 +0900
commitd0ad7033c3e11549529b44990ef022a655877601 (patch)
tree8d7b0efa810451af3abdca6a11b4550168d6f76c /src/AbstractCommand.cc
parent82ba00320923319943cfb79282ada5aaad4d5334 (diff)
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.
Diffstat (limited to 'src/AbstractCommand.cc')
-rw-r--r--src/AbstractCommand.cc5
1 files changed, 3 insertions, 2 deletions
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;