diff --git a/NEWS b/NEWS index 05757e79..68e6bb1a 100644 --- a/NEWS +++ b/NEWS @@ -25,6 +25,10 @@ where the last attempt left off, and only then continues appending to the file. That way the downloaded file never shrinks, and "start over" retries work correctly even when downloading to stdout. +** Passive FTP is now the default FTP transfer mode. Use +`--no-passive-ftp' or specify `passive_ftp = off' in your init file to +revert to the old behavior. + ** The `--header' option can now be used to override generated headers. For example, `wget --header="Host: foo.bar" http://127.0.0.1' tells Wget to connect to localhost, but to specify @@ -54,9 +58,9 @@ have also been changed this way, but they still accept the old syntax for backward compatibility. For example, instead of `--glob=off' you can write `--no-glob'. -Allowing `--no-OPTION' for every `--OPTION' is useful because it -allows the user to override non-default behavior specified via -`.wgetrc'. +Allowing `--no-OPTION' for every `--OPTION' and the other way around +is useful because it allows the user to override non-default behavior +specified via `.wgetrc'. ** The new option `--keep-session-cookies' causes `--save-cookies' to save session cookies along with the permanent ones. This is useful on diff --git a/doc/wget.texi b/doc/wget.texi index db7b10d8..6719991b 100644 --- a/doc/wget.texi +++ b/doc/wget.texi @@ -177,9 +177,10 @@ download from where it left off. @item Wget supports proxy servers, which can lighten the network load, speed up retrieval and provide access behind firewalls. However, if you are -behind a firewall that requires that you use a socks style gateway, you -can get the socks library and build Wget with support for socks. Wget -also supports the passive @sc{ftp} downloading as an option. +behind a firewall that requires that you use a socks style gateway, +you can get the socks library and build Wget with support for socks. +Wget uses the passive @sc{ftp} downloading by default, active @sc{ftp} +being an option. @sp 1 @item @@ -1264,10 +1265,17 @@ system-specific. This is why it currently works only with Unix @sc{ftp} servers (and the ones emulating Unix @code{ls} output). @cindex passive ftp -@item --passive-ftp -Use the @dfn{passive} @sc{ftp} retrieval scheme, in which the client -initiates the data connection. This is sometimes required for @sc{ftp} -to work behind firewalls. +@item --no-passive-ftp +Disable the use of the @dfn{passive} FTP transfer mode. Passive FTP +mandates that the client connect to the server to establish the data +connection rather than the other way around. + +If the machine is connected to the Internet directly, both passive and +active FTP should work equally well. Behind most firewall and NAT +configurations passive FTP has a better chance of working. However, +in some rare firewall configurations, active FTP actually works when +passive FTP doesn't. If you suspect this to be the case, use this +option, or set @code{passive_ftp=off} in your init file. @cindex symbolic links, retrieving @item --retr-symlinks @@ -2387,10 +2395,11 @@ Download all ancillary documents necessary for a single @sc{html} page to display properly---the same as @samp{-p}. @item passive_ftp = on/off/always/never -Set passive @sc{ftp}---the same as @samp{--passive-ftp}. Some scripts -and @samp{.pm} (Perl module) files download files using @samp{wget ---passive-ftp}. If your firewall does not allow this, you can set -@samp{passive_ftp = never} to override the command-line. +Change setting of passive @sc{ftp}, equivalent to the +@samp{--passive-ftp} option. Some scripts and @samp{.pm} (Perl +module) files download files using @samp{wget --passive-ftp}. If your +firewall does not allow this, you can set @samp{passive_ftp = never} +to override the command-line. @item passwd = @var{string} Set your @sc{ftp} password to @var{password}. Without this setting, the diff --git a/src/ChangeLog b/src/ChangeLog index 39af0663..2a518749 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-03-06 Hrvoje Niksic + + * init.c (defaults): Use passive FTP by default. + 2005-03-06 Hrvoje Niksic * mswindows.c: Provide wrappers to Winsock functions that set diff --git a/src/init.c b/src/init.c index 9cb2e9c7..4c3356e1 100644 --- a/src/init.c +++ b/src/init.c @@ -287,6 +287,7 @@ defaults (void) opt.dots_in_line = 50; opt.dns_cache = 1; + opt.ftp_pasv = 1; /* The default for file name restriction defaults to the OS type. */ #if !defined(WINDOWS) && !defined(__CYGWIN__) diff --git a/src/main.c b/src/main.c index 32a79f1b..eb044783 100644 --- a/src/main.c +++ b/src/main.c @@ -555,7 +555,7 @@ FTP options:\n"), N_("\ --no-glob turn off FTP file name globbing.\n"), N_("\ - --passive-ftp use the \"passive\" transfer mode.\n"), + --no-passive-ftp disable the \"passive\" transfer mode.\n"), N_("\ --retr-symlinks when recursing, get linked-to files (not dir).\n"), N_("\