diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-05-12 00:21:22 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-05-12 00:31:57 +0900 |
| commit | d0ad7033c3e11549529b44990ef022a655877601 (patch) | |
| tree | 8d7b0efa810451af3abdca6a11b4550168d6f76c /src/InitiateConnectionCommandFactory.cc | |
| parent | 82ba00320923319943cfb79282ada5aaad4d5334 (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/InitiateConnectionCommandFactory.cc')
| -rw-r--r-- | src/InitiateConnectionCommandFactory.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/InitiateConnectionCommandFactory.cc b/src/InitiateConnectionCommandFactory.cc index 2856b244..b4615d7a 100644 --- a/src/InitiateConnectionCommandFactory.cc +++ b/src/InitiateConnectionCommandFactory.cc @@ -71,10 +71,14 @@ InitiateConnectionCommandFactory::createInitiateConnectionCommand return make_unique<HttpInitiateConnectionCommand>(cuid, req, fileEntry, requestGroup, e); - } else if(req->getProtocol() == "ftp") { + } else if(req->getProtocol() == "ftp" +#ifdef HAVE_LIBSSH2 + || req->getProtocol() == "sftp" +#endif // HAVE_LIBSSH2 + ) { if(req->getFile().empty()) { throw DL_ABORT_EX - (fmt("FTP URI %s doesn't contain file path.", + (fmt("FTP/SFTP URI %s doesn't contain file path.", req->getUri().c_str())); } return make_unique<FtpInitiateConnectionCommand>(cuid, req, fileEntry, |
