Uri support

- TransportCurl now supports non-anonymous ftp
This commit is contained in:
Johannes Schlatow
2010-10-15 00:12:42 +02:00
parent 36800e0a35
commit d39d5af03b

View File

@@ -41,6 +41,12 @@ void TransportCurl::send(const std::string& source)
if (uri.host == "") if (uri.host == "")
throw std::string ("when using the 'curl' protocol, the uri must contain a hostname."); throw std::string ("when using the 'curl' protocol, the uri must contain a hostname.");
if (uri.user != "")
{
arguments.push_back("--user");
arguments.push_back(uri.user);
}
if (is_filelist(source)) if (is_filelist(source))
{ {
std::string::size_type pos; std::string::size_type pos;
@@ -96,6 +102,13 @@ void TransportCurl::recv(std::string target)
if (uri.host == "") if (uri.host == "")
throw std::string ("when using the 'curl' protocol, the uri must contain a hostname."); throw std::string ("when using the 'curl' protocol, the uri must contain a hostname.");
if (uri.user != "")
{
arguments.push_back("--user");
arguments.push_back(uri.user);
}
if (is_filelist(uri.path)) if (is_filelist(uri.path))
{ {
std::string::size_type pos; std::string::size_type pos;