diff --git a/CHANGES b/CHANGES index 1090b9a5357220a3a41589741363609ba4711b0e..382fd5da87970a82807ad63d23f7e0ac9f6dea6f 100644 --- a/CHANGES +++ b/CHANGES @@ -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 diff --git a/src/main.c b/src/main.c index f71262bc201938fa2a5475d26392cdffd6c2305c..c332f6a477f6d76453e6056ce1cd599e2db340c0 100644 --- a/src/main.c +++ b/src/main.c @@ -313,6 +313,7 @@ static void help(void) " -d/--data HTTP POST data (H)\n" " --data-ascii HTTP POST ASCII data (H)\n" " --data-binary HTTP POST binary data (H)\n" + " --disable-epsv Prevents curl from using EPSV (F)\n" " -D/--dump-header Write the headers to this file\n" " --egd-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);