aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-12-02 18:01:08 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-12-02 18:01:08 +0000
commitad5ead8bed7390d3a1ed3a37fa60cc90bdc73a8e (patch)
tree95b30ce8a4234b126d64a6ba9398d4f704cd6f84 /src
parent1b99d33b59e86cf086cd0e8c6618f41108934fcf (diff)
--ftp-pasv now overrides a previous --ftpport option. We now also support
it named "--ftp-port" as the additional dash between the words is used in several other options and this makes it more consistant.
Diffstat (limited to 'src')
-rw-r--r--src/main.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 411639220..5e4013fb4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -410,6 +410,7 @@ 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-ssl Enable SSL/TLS for the ftp transfer (F)",
" -F/--form <name=content> Specify HTTP multipart POST data (H)",
" -g/--globoff Disable URL sequences and ranges using {} and []",
@@ -440,7 +441,7 @@ static void help(void)
" -O/--remote-name Write output to a file named as the remote file",
" -p/--proxytunnel Operate through a HTTP proxy tunnel (using CONNECT)",
" --proxy-ntlm Enable NTLM authentication on the proxy (H)",
- " -P/--ftpport <address> Use PORT with address instead of PASV (F)",
+ " -P/--ftp-port <address> Use PORT with address instead of PASV (F)",
" -q If used as the first parameter disables .curlrc",
" -Q/--quote <cmd> Send command(s) to server before file transfer (F)",
" -r/--range <range> Retrieve a byte range from a HTTP/1.1 or FTP server",
@@ -1190,6 +1191,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
{"*y", "max-filesize", TRUE},
{"*z", "disable-eprt", FALSE},
{"$a", "ftp-ssl", FALSE},
+ {"$b", "ftp-pasv", FALSE},
{"0", "http1.0", FALSE},
{"1", "tlsv1", FALSE},
{"2", "sslv2", FALSE},
@@ -1237,7 +1239,8 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
{"o", "output", TRUE},
{"O", "remote-name", FALSE},
{"p", "proxytunnel", FALSE},
- {"P", "ftpport", TRUE},
+ {"P", "ftpport", TRUE}, /* older version */
+ {"P", "ftp-port", TRUE},
{"q", "disable", FALSE},
{"Q", "quote", TRUE},
{"r", "range", TRUE},
@@ -1504,6 +1507,11 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
case 'a': /* --ftp-ssl */
config->ftp_ssl ^= TRUE;
break;
+ case 'b': /* --ftp-pasv */
+ if(config->ftpport)
+ free(config->ftpport);
+ config->ftpport = NULL;
+ break;
}
break;
case '#': /* added 19990617 larsa */