From 7e845e7cfdd658caccc60f687d5d5d68d7e88937 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 4 Sep 2005 05:16:06 +0000 Subject: Added FTP_SKIP_PASV_IP and --ftp-skip-pasv-ip --- src/main.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index e0eb6bbc7..dda4dab80 100644 --- a/src/main.c +++ b/src/main.c @@ -315,6 +315,7 @@ struct Configurable { bool insecure_ok; /* set TRUE to allow insecure SSL connects */ bool create_dirs; bool ftp_create_dirs; + bool ftp_skip_ip; bool proxyntlm; bool proxydigest; bool proxybasic; @@ -508,7 +509,8 @@ static void help(void) " --crlf Convert LF to CRLF in upload", " -f/--fail Fail silently (no output at all) on errors (H)", " --ftp-create-dirs Create the remote dirs if not present (F)", - " --ftp-pasv Use PASV instead of PORT (F)", + " --ftp-pasv Use PASV/EPSV instead of PORT (F)", + " --ftp-skip-pasv-ip Skip the IP address for PASV (F)\n" " --ftp-ssl Enable SSL/TLS for the ftp transfer (F)", " -F/--form Specify HTTP multipart POST data (H)", " --form-string Specify HTTP multipart POST data (H)", @@ -1313,6 +1315,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ {"$n", "proxy-anyauth", FALSE}, {"$o", "trace-time", FALSE}, {"$p", "ignore-content-length", FALSE}, + {"$q", "ftp-skip-pasv-ip", FALSE}, {"0", "http1.0", FALSE}, {"1", "tlsv1", FALSE}, @@ -1709,6 +1712,9 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ case 'p': /* --ignore-content-length */ config->ignorecl ^= TRUE; break; + case 'q': /* --ftp-skip-pasv-ip */ + config->ftp_skip_ip ^= TRUE; + break; } break; case '#': /* --progress-bar */ @@ -3905,6 +3911,10 @@ operate(struct Configurable *config, int argc, char *argv[]) curl_easy_setopt(curl, CURLOPT_IGNORE_CONTENT_LENGTH, config->ignorecl); + /* curl 7.14.1 */ + curl_easy_setopt(curl, CURLOPT_FTP_SKIP_PASV_IP, + config->ftp_skip_ip); + retry_numretries = config->req_retry; retrystart = curlx_tvnow(); -- cgit v1.2.3