summaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2010-01-01 14:44:44 +0000
committerDaniel Stenberg <daniel@haxx.se>2010-01-01 14:44:44 +0000
commit605bbfc4c0fa838f50bf9d18e69e417168f524c0 (patch)
tree405fa3f29adea6bacbaad6b1edf8ad8f9e5b718a /lib/url.c
parent42d365f199f9637820de4ecdee21bc7d4668f138 (diff)
downloadcurl-605bbfc4c0fa838f50bf9d18e69e417168f524c0.tar.gz
- Ingmar Runge enhanced libcurl's FTP engine to support the PRET command. This
command is a special "hack" used by the drftpd server, but even though it is a custom extension I've deemed it fine to add to libcurl since this server seems to survive and people keep using it and want libcurl to support it. The new libcurl option is named CURLOPT_FTP_USE_PRET, and it is also usable from the curl tool with --ftp-pret. Using this option on a server that doesn't support this command will make libcurl fail.
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/url.c b/lib/url.c
index 3f2f1cd72..19283c290 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -701,6 +701,7 @@ CURLcode Curl_init_userdefined(struct UserDefined *set)
set->httpreq = HTTPREQ_GET; /* Default HTTP request */
set->ftp_use_epsv = TRUE; /* FTP defaults to EPSV operations */
set->ftp_use_eprt = TRUE; /* FTP defaults to EPRT operations */
+ set->ftp_use_pret = FALSE; /* mainly useful for drftpd servers */
set->ftp_filemethod = FTPFILE_MULTICWD;
set->dns_cache_timeout = 60; /* Timeout every 60 seconds by default */
@@ -1563,6 +1564,10 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
data->set.ftp_use_epsv = (bool)(0 != va_arg(param, long));
break;
+ case CURLOPT_FTP_USE_PRET:
+ data->set.ftp_use_pret = (bool)(0 != va_arg(param, long));
+ break;
+
case CURLOPT_FTP_SSL_CCC:
data->set.ftp_ccc = (curl_ftpccc)va_arg(param, long);
break;