1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

--disable-epsv

This commit is contained in:
Daniel Stenberg 2001-11-29 19:42:51 +00:00
parent 6c81d74626
commit 87c562845c
2 changed files with 16 additions and 1 deletions

View File

@ -7,7 +7,11 @@
History of Changes
Daniel (29 November 2001)
- Eric provided a few more fixes for building on Macs.
- Added --disable-epsv as an option. When used, curl won't attempt to use the
EPSV command when doing passive FTP downloads.
- Eric provided a few more fixes for building on Macs. He also pointed out
a flaw in the signal handler restoration code.
Daniel (28 November 2001)
- Fiddled with some Tru64 problems reported by Dimitris Sarris. They appear

View File

@ -313,6 +313,7 @@ static void help(void)
" -d/--data <data> HTTP POST data (H)\n"
" --data-ascii <data> HTTP POST ASCII data (H)\n"
" --data-binary <data> HTTP POST binary data (H)\n"
" --disable-epsv Prevents curl from using EPSV (F)\n"
" -D/--dump-header <file> Write the headers to this file\n"
" --egd-file <file> EGD socket path for random data (SSL)\n"
" -e/--referer Referer page (H)");
@ -387,6 +388,7 @@ struct Configurable {
char *cookiefile; /* read from this file */
bool use_resume;
bool resume_from_current;
bool disable_epsv;
int resume_from;
char *postfields;
long postfieldsize;
@ -862,6 +864,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
{"5b", "egd-file", TRUE},
{"5c", "connect-timeout", TRUE},
{"5d", "ciphers", TRUE},
{"5e", "disable-epsv", FALSE},
{"0", "http1.0", FALSE},
{"1", "tlsv1", FALSE},
@ -1028,6 +1031,9 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
case 'd': /* ciphers */
GetStr(&config->cipher_list, nextarg);
break;
case 'e': /* --disable-epsv */
config->disable_epsv ^= TRUE;
break;
default: /* the URL! */
{
struct getout *url;
@ -2305,6 +2311,11 @@ operate(struct Configurable *config, int argc, char *argv[])
if(config->httpversion)
curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, config->httpversion);
/* new in libcurl 7.9.2: */
if(config->disable_epsv)
/* disable it */
curl_easy_setopt(curl, CURLOPT_FTP_USE_EPSV, FALSE);
res = curl_easy_perform(curl);