mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
support for CURLOPT_FTP_USE_EPRT added
This commit is contained in:
parent
ca04620253
commit
94a157d0b0
@ -1080,7 +1080,8 @@ CURLcode ftp_use_port(struct connectdata *conn)
|
|||||||
return CURLE_FTP_PORT_FAILED;
|
return CURLE_FTP_PORT_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (modep = (char **)mode; modep && *modep; modep++) {
|
for (modep = (char **)(data->set.ftp_use_eprt?&mode[0]:&mode[2]);
|
||||||
|
modep && *modep; modep++) {
|
||||||
int lprtaf, eprtaf;
|
int lprtaf, eprtaf;
|
||||||
int alen=0, plen=0;
|
int alen=0, plen=0;
|
||||||
|
|
||||||
|
@ -284,6 +284,7 @@ CURLcode Curl_open(struct SessionHandle **curl)
|
|||||||
|
|
||||||
data->set.httpreq = HTTPREQ_GET; /* Default HTTP request */
|
data->set.httpreq = HTTPREQ_GET; /* Default HTTP request */
|
||||||
data->set.ftp_use_epsv = TRUE; /* FTP defaults to EPSV operations */
|
data->set.ftp_use_epsv = TRUE; /* FTP defaults to EPSV operations */
|
||||||
|
data->set.ftp_use_eprt = TRUE; /* FTP defaults to EPRT operations */
|
||||||
|
|
||||||
data->set.dns_cache_timeout = 60; /* Timeout every 60 seconds by default */
|
data->set.dns_cache_timeout = 60; /* Timeout every 60 seconds by default */
|
||||||
|
|
||||||
@ -634,10 +635,14 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...)
|
|||||||
data->set.ftp_use_port = data->set.ftpport?1:0;
|
data->set.ftp_use_port = data->set.ftpport?1:0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case CURLOPT_FTP_USE_EPRT:
|
||||||
|
data->set.ftp_use_eprt = va_arg(param, long)?TRUE:FALSE;
|
||||||
|
break;
|
||||||
|
|
||||||
case CURLOPT_FTP_USE_EPSV:
|
case CURLOPT_FTP_USE_EPSV:
|
||||||
data->set.ftp_use_epsv = va_arg(param, long)?TRUE:FALSE;
|
data->set.ftp_use_epsv = va_arg(param, long)?TRUE:FALSE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CURLOPT_HTTPHEADER:
|
case CURLOPT_HTTPHEADER:
|
||||||
/*
|
/*
|
||||||
* Set a list with HTTP headers to use (or replace internals with)
|
* Set a list with HTTP headers to use (or replace internals with)
|
||||||
|
@ -759,6 +759,7 @@ struct UserDefined {
|
|||||||
bool reuse_fresh; /* do not re-use an existing connection */
|
bool reuse_fresh; /* do not re-use an existing connection */
|
||||||
bool expect100header; /* TRUE if we added Expect: 100-continue */
|
bool expect100header; /* TRUE if we added Expect: 100-continue */
|
||||||
bool ftp_use_epsv; /* if EPSV is to be attempted or not */
|
bool ftp_use_epsv; /* if EPSV is to be attempted or not */
|
||||||
|
bool ftp_use_eprt; /* if EPRT is to be attempted or not */
|
||||||
bool no_signal; /* do not use any signal/alarm handler */
|
bool no_signal; /* do not use any signal/alarm handler */
|
||||||
|
|
||||||
bool global_dns_cache;
|
bool global_dns_cache;
|
||||||
|
Loading…
Reference in New Issue
Block a user