diff --git a/docs/curl.1 b/docs/curl.1 index f2ab5f4f7..9c16eda3a 100644 --- a/docs/curl.1 +++ b/docs/curl.1 @@ -2,7 +2,7 @@ .\" nroff -man curl.1 .\" Written by Daniel Stenberg .\" -.TH curl 1 "7 Nov 2003" "Curl 7.10.8" "Curl Manual" +.TH curl 1 "2 Dec 2003" "Curl 7.11.0" "Curl Manual" .SH NAME curl \- transfer a URL .SH SYNOPSIS @@ -293,9 +293,19 @@ prevent curl from outputting that and fail silently instead. If this option is used twice, the second will again disable silent failure. .IP "--ftp-create-dirs" (FTP) When an FTP URL/operation uses a path that doesn't currently exist on -the server, the standard behaviour of curl is to fail. Using this option, curl +the server, the standard behavior of curl is to fail. Using this option, curl will instead attempt to create missing directories. (Added in 7.10.7) +If this option is used twice, the second will again disable silent failure. +.IP "--ftp-pasv" +(FTP) Use PASV when transfering. PASV is the internal default behavior, but +using this option can be used to override a previos --ftp-port option. (Added +in 7.11.0) + +If this option is used twice, the second will again disable silent failure. +.IP "--ftp-ssl" +(FTP) Make the FTP connection switch to use SSL/TLS. (Added in 7.11.0) + If this option is used twice, the second will again disable silent failure. .IP "-F/--form " (HTTP) This lets curl emulate a filled in form in which a user has pressed the @@ -557,13 +567,12 @@ and requires that the proxy allows direct connect to the remote port number curl wants to tunnel through to. If this option is used twice, the second will again disable proxy tunnel. -.IP "-P/--ftpport
" -(FTP) -Reverses the initiator/listener roles when connecting with ftp. This -switch makes Curl use the PORT command instead of PASV. In -practice, PORT tells the server to connect to the client's specified -address and port, while PASV asks the server for an ip address and -port to connect to.
should be one of: +.IP "-P/--ftp-port
" +(FTP) Reverses the initiator/listener roles when connecting with ftp. This +switch makes Curl use the PORT command instead of PASV. In practice, PORT +tells the server to connect to the client's specified address and port, while +PASV asks the server for an ip address and port to connect to.
+should be one of: .RS .IP interface i.e "eth0" to specify which interface's IP address you want to use (Unix only) @@ -575,7 +584,8 @@ i.e "my.host.domain" to specify machine (any single-letter string) to make it pick the machine's default .RE -If this option is used several times, the last one will be used. +If this option is used several times, the last one will be used. Disable the +use of PORT with \fI--ftp-pasv\fP. .IP "-q" If used as the first parameter on the command line, the \fI$HOME/.curlrc\fP file will not be read and used as a config file. 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 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
Use PORT with address instead of PASV (F)", + " -P/--ftp-port
Use PORT with address instead of PASV (F)", " -q If used as the first parameter disables .curlrc", " -Q/--quote Send command(s) to server before file transfer (F)", " -r/--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 */