+2005-04-27 Mauro Tortonesi <mauro@ferrara.linux.it>
+
+ * NEWS: Mention the new --ftp-user, --ftp-password, --user and
+ --password options, the name changes for --http-passwd and
+ --proxy-passwd and the deprecation of login and passwd commands.
+
2005-04-22 Hrvoje Niksic <hniksic@xemacs.org>
* po/eo.po: Added Esperanto translation.
\f
* Changes in Wget 1.10.
+** Wget now supports the --ftp-user and --ftp-password command switches to set
+username and password for FTP, and the --user and --password command switches
+to set username and password for both FTP and HTTP. The --http-passwd and
+--proxy-passwd command switches have been renamed to --http-password and
+--proxy-password respectively, and the related http_passwd and proxy_passwd
+.wgetrc commands to http_password and proxy_password respectively. The
+login and passwd .wgetrc commands have been deprecated.
+
** Downloading files greater than 2GB, also known as "large files",
now works on systems that support them. This includes most modern
Unix variants, as well as Windows.
+2005-04-27 Mauro Tortonesi <mauro@ferrara.linux.it>
+
+ * wget.texi: Document --user, --password, --ftp-user and the
+ corresponding Wgetrc command. Renamed --ftp-passwd to --ftp-password,
+ --http-passwd to --http-passwd and --proxy-passwd to proxy_password.
+ Renamed ftp_passwd to ftp_password, http_passwd to http_passwd and
+ proxy_passwd to proxy_password. Removed documentation for the
+ deprecated login command.
+
2005-04-27 Hrvoje Niksic <hniksic@xemacs.org>
* wget.texi (HTTPS (SSL/TLS) Options): Document --random-file.
not running at all and that retries would not help. This option is
for mirroring unreliable sites whose servers tend to disappear for
short periods of time.
+
+@cindex user
+@cindex password
+@cindex authentication
+@item --user=@var{user}
+@itemx --password=@var{password}
+Specify the username @var{user} and password @var{password} for both
+@sc{ftp} and @sc{http} file retrieval. These parameters can be overridden
+using the @samp{--ftp-user} and @samp{--ftp-password} options for
+@sc{ftp} connections and the @samp{--http-user} and @samp{--http-password}
+options for @sc{http} connections.
@end table
@node Directory Options
@cindex http password
@cindex authentication
@item --http-user=@var{user}
-@itemx --http-passwd=@var{password}
+@itemx --http-password=@var{password}
Specify the username @var{user} and password @var{password} on an
@sc{http} server. According to the type of the challenge, Wget will
encode them using either the @code{basic} (insecure) or the
@cindex proxy password
@cindex proxy authentication
@item --proxy-user=@var{user}
-@itemx --proxy-passwd=@var{password}
+@itemx --proxy-password=@var{password}
Specify the username @var{user} and password @var{password} for
authentication on a proxy server. Wget will encode them using the
@code{basic} authentication scheme.
-Security considerations similar to those with @samp{--http-passwd}
+Security considerations similar to those with @samp{--http-password}
pertain here as well.
@cindex http referer
@section FTP Options
@table @samp
-@cindex password, FTP
-@item --ftp-passwd=@var{string}
-Set the default FTP password to @var{string}. Without this, or the
-corresponding startup option, the password defaults to @samp{-wget@@},
-normally used for anonymous FTP.
+@cindex ftp user
+@cindex ftp password
+@cindex ftp authentication
+@item --ftp-user=@var{user}
+@itemx --ftp-password=@var{password}
+Specify the username @var{user} and password @var{password} on an
+@sc{ftp} server. Without this, or the corresponding startup option,
+the password defaults to @samp{-wget@@}, normally used for anonymous
+FTP.
+
+Another way to specify username and password is in the @sc{url} itself
+(@pxref{URL Format}). Either method reveals your password to anyone who
+bothers to run @code{ps}. To prevent the passwords from being seen,
+store them in @file{.wgetrc} or @file{.netrc}, and make sure to protect
+those files from other users with @code{chmod}. If the passwords are
+really important, do not leave them lying in those files either---edit
+the files and delete them after Wget has started the download.
+
+For more information about security issues with Wget, @xref{Security
+Considerations}.
@cindex .listing files, removing
@item --no-remove-listing
If set to on, force the input filename to be regarded as an @sc{html}
document---the same as @samp{-F}.
-@item ftp_passwd = @var{string}
+@item ftp_password = @var{string}
Set your @sc{ftp} password to @var{string}. Without this setting, the
password defaults to @samp{-wget@@}, which is a useful default for
anonymous @sc{ftp} access.
Use @var{string} as @sc{ftp} proxy, instead of the one specified in
environment.
+@item ftp_user = @var{string}
+Set @sc{ftp} user to @var{string}.
+
+This command used to be named @code{login} prior to Wget 1.10.
+
@item glob = on/off
Turn globbing on/off---the same as @samp{--glob} and @samp{--no-glob}.
Turn the keep-alive feature on or off (defaults to on). Turning it
off is equivalent to @samp{--no-http-keep-alive}.
-@item http_passwd = @var{string}
+@item http_password = @var{string}
Set @sc{http} password, equivalent to
-@samp{--http-passwd=@var{string}}.
+@samp{--http-password=@var{string}}.
@item http_proxy = @var{string}
Use @var{string} as @sc{http} proxy, instead of the one specified in
@item logfile = @var{file}
Set logfile to @var{file}, the same as @samp{-o @var{file}}.
-@item login = @var{string}
-Your user name on the remote machine, for @sc{ftp}. Defaults to
-@samp{anonymous}.
-
@item mirror = on/off
Turn mirroring on/off. The same as @samp{-m}.
firewall does not allow this, you can set @samp{passive_ftp = never}
to override the command-line.
+@itemx password = @var{string}
+Specify password @var{string} for both @sc{ftp} and @sc{http} file retrieval.
+This command can be overridden using the @samp{ftp_password} and
+@samp{http_password} command for @sc{ftp} and @sc{http} respectively.
+
@item post_data = @var{string}
Use POST as the method for all HTTP requests and send @var{string} in
the request body. The same as @samp{--post-data=@var{string}}.
Set proxy authentication user name to @var{string}, like
@samp{--proxy-user=@var{string}}.
-@item proxy_passwd = @var{string}
+@item proxy_password = @var{string}
Set proxy authentication password to @var{string}, like
-@samp{--proxy-passwd=@var{string}}.
+@samp{--proxy-password=@var{string}}.
@item quiet = on/off
Quiet mode---the same as @samp{-q}.
variables are set. In that case it is the same as using
@samp{--no-proxy}.
+@item user = @var{string}
+Specify username @var{string} for both @sc{ftp} and @sc{http} file retrieval.
+This command can be overridden using the @samp{ftp_user} and
+@samp{http_user} command for @sc{ftp} and @sc{http} respectively.
+
@item verbose = on/off
Turn verbose on/off---the same as @samp{-v}/@samp{-nv}.
Alternatively, you may use the @samp{proxy-user} and
@samp{proxy-password} options, and the equivalent @file{.wgetrc}
-settings @code{proxy_user} and @code{proxy_passwd} to set the proxy
+settings @code{proxy_user} and @code{proxy_password} to set the proxy
username and password.
@node Distribution
+2005-04-27 Mauro Tortonesi <mauro@ferrara.linux.it>
+
+ * ftp.c: Add support for --user and --password.
+
+ * http.c: Add support for --user and --password.
+
+ * init.c: Deprecated ftppasswd, httppasswd, login, passwd and
+ proxypasswd commands. Added ftppassword, ftpuser, httppassword,
+ password, proxypassword and user commands.
+
+ * main.c: Renamed --ftp-passwd to --ftp-password. Added --ftp-user,
+ --http-password, --password, --proxy-password and --user. Deprecated
+ --http-passwd and --proxy-passwd. Added documentation for new options
+ and removed documentation for deprecated options in the help string.
+
+ * options.h (struct options): Added user and passwd members to handle
+ --user and --password respectively. Renamed ftp_acc and ftp_pass
+ members to ftp_user and ftp_passwd for consistency.
+
2005-04-27 Hrvoje Niksic <hniksic@xemacs.org>
* main.c (print_help): Advertise "DER", not "ASN1".
user = u->user;
passwd = u->passwd;
search_netrc (u->host, (const char **)&user, (const char **)&passwd, 1);
- user = user ? user : opt.ftp_acc;
- passwd = passwd ? passwd : opt.ftp_pass;
- assert (user && passwd);
+ user = user ? user : (opt.ftp_user ? opt.ftp_user : opt.user);
+ if (!user) user = "anonymous";
+ passwd = passwd ? passwd : (opt.ftp_passwd ? opt.ftp_passwd : opt.passwd);
+ if (!passwd) passwd = "-wget@";
dtsock = -1;
local_sock = -1;
user = u->user;
passwd = u->passwd;
search_netrc (u->host, (const char **)&user, (const char **)&passwd, 0);
- user = user ? user : opt.http_user;
- passwd = passwd ? passwd : opt.http_passwd;
+ user = user ? user : (opt.http_user ? opt.http_user : opt.user);
+ passwd = passwd ? passwd : (opt.http_passwd ? opt.http_passwd : opt.passwd);
if (user && passwd)
{
{ "followftp", &opt.follow_ftp, cmd_boolean },
{ "followtags", &opt.follow_tags, cmd_vector },
{ "forcehtml", &opt.force_html, cmd_boolean },
- { "ftppasswd", &opt.ftp_pass, cmd_string },
+ { "ftppasswd", &opt.ftp_passwd, cmd_string }, /* deprecated */
+ { "ftppassword", &opt.ftp_passwd, cmd_string },
+ { "ftpuser", &opt.ftp_user, cmd_string },
{ "ftpproxy", &opt.ftp_proxy, cmd_string },
{ "glob", &opt.ftp_glob, cmd_boolean },
{ "header", &opt.user_headers, cmd_spec_header },
{ "htmlextension", &opt.html_extension, cmd_boolean },
{ "htmlify", NULL, cmd_spec_htmlify },
{ "httpkeepalive", &opt.http_keep_alive, cmd_boolean },
- { "httppasswd", &opt.http_passwd, cmd_string },
+ { "httppasswd", &opt.http_passwd, cmd_string }, /* deprecated */
+ { "httppassword", &opt.http_passwd, cmd_string },
{ "httpproxy", &opt.http_proxy, cmd_string },
{ "httpsproxy", &opt.https_proxy, cmd_string },
{ "httpuser", &opt.http_user, cmd_string },
{ "limitrate", &opt.limit_rate, cmd_bytes },
{ "loadcookies", &opt.cookies_input, cmd_file },
{ "logfile", &opt.lfilename, cmd_file },
- { "login", &opt.ftp_acc, cmd_string },
+ { "login", &opt.ftp_user, cmd_string },/* deprecated*/
{ "mirror", NULL, cmd_spec_mirror },
{ "netrc", &opt.netrc, cmd_boolean },
{ "noclobber", &opt.noclobber, cmd_boolean },
{ "outputdocument", &opt.output_document, cmd_file },
{ "pagerequisites", &opt.page_requisites, cmd_boolean },
{ "passiveftp", &opt.ftp_pasv, cmd_lockable_boolean },
+ { "passwd", &opt.ftp_passwd, cmd_string },/* deprecated*/
+ { "password", &opt.passwd, cmd_string },
{ "postdata", &opt.post_data, cmd_string },
{ "postfile", &opt.post_file_name, cmd_file },
{ "preferfamily", NULL, cmd_spec_prefer_family },
#endif
{ "progress", &opt.progress_type, cmd_spec_progress },
{ "protocoldirectories", &opt.protocol_directories, cmd_boolean },
- { "proxypasswd", &opt.proxy_passwd, cmd_string },
+ { "proxypasswd", &opt.proxy_passwd, cmd_string }, /* deprecated */
+ { "proxypassword", &opt.proxy_passwd, cmd_string },
{ "proxyuser", &opt.proxy_user, cmd_string },
{ "quiet", &opt.quiet, cmd_boolean },
{ "quota", &opt.quota, cmd_bytes_large },
{ "timestamping", &opt.timestamping, cmd_boolean },
{ "tries", &opt.ntry, cmd_number_inf },
{ "useproxy", &opt.use_proxy, cmd_boolean },
+ { "user", &opt.user, cmd_string },
{ "useragent", NULL, cmd_spec_useragent },
{ "verbose", &opt.verbose, cmd_boolean },
{ "wait", &opt.wait, cmd_time },
opt.ntry = 20;
opt.reclevel = 5;
opt.add_hostdir = 1;
- opt.ftp_acc = xstrdup ("anonymous");
- opt.ftp_pass = xstrdup ("-wget@");
opt.netrc = 1;
opt.ftp_glob = 1;
opt.htmlify = 1;
free_vec (opt.ignore_tags);
xfree_null (opt.progress_type);
xfree (opt.ftp_acc);
- xfree_null (opt.ftp_pass);
+ xfree_null (opt.ftp_user);
+ xfree_null (opt.ftp_passwd);
xfree_null (opt.ftp_proxy);
xfree_null (opt.https_proxy);
xfree_null (opt.http_proxy);
xfree_null (opt.bind_address);
xfree_null (opt.cookies_input);
xfree_null (opt.cookies_output);
+ xfree_null (opt.user);
+ xfree_null (opt.passwd);
#endif /* DEBUG_MALLOC */
}
{ "follow-tags", 0, OPT_VALUE, "followtags", -1 },
{ "force-directories", 'x', OPT_BOOLEAN, "dirstruct", -1 },
{ "force-html", 'F', OPT_BOOLEAN, "forcehtml", -1 },
- { "ftp-passwd", 0, OPT_VALUE, "ftppasswd", -1 },
+ { "ftp-password", 0, OPT_VALUE, "ftppasswd", -1 },
+ { "ftp-user", 0, OPT_VALUE, "ftpuser", -1 },
{ "glob", 0, OPT_BOOLEAN, "glob", -1 },
{ "header", 0, OPT_VALUE, "header", -1 },
{ "help", 'h', OPT_FUNCALL, (void *)print_help, no_argument },
{ "html-extension", 'E', OPT_BOOLEAN, "htmlextension", -1 },
{ "htmlify", 0, OPT_BOOLEAN, "htmlify", -1 },
{ "http-keep-alive", 0, OPT_BOOLEAN, "httpkeepalive", -1 },
- { "http-passwd", 0, OPT_VALUE, "httppasswd", -1 },
+ { "http-passwd", 0, OPT_VALUE, "httppasswd", -1 }, /* deprecated */
+ { "http-password", 0, OPT_VALUE, "httppasswd", -1 },
{ "http-user", 0, OPT_VALUE, "httpuser", -1 },
{ "ignore-length", 0, OPT_BOOLEAN, "ignorelength", -1 },
{ "ignore-tags", 0, OPT_VALUE, "ignoretags", -1 },
{ "page-requisites", 'p', OPT_BOOLEAN, "pagerequisites", -1 },
{ "parent", 0, OPT__PARENT, NULL, optional_argument },
{ "passive-ftp", 0, OPT_BOOLEAN, "passiveftp", -1 },
+ { "password", 0, OPT_VALUE, "password", -1 },
{ "post-data", 0, OPT_VALUE, "postdata", -1 },
{ "post-file", 0, OPT_VALUE, "postfile", -1 },
{ "prefer-family", 0, OPT_VALUE, "preferfamily", -1 },
{ "protocol-directories", 0, OPT_BOOLEAN, "protocoldirectories", -1 },
{ "proxy", 0, OPT_BOOLEAN, "useproxy", -1 },
{ "proxy__compat", 'Y', OPT_VALUE, "useproxy", -1 }, /* back-compatible */
- { "proxy-passwd", 0, OPT_VALUE, "proxypasswd", -1 },
+ { "proxy-passwd", 0, OPT_VALUE, "proxypasswd", -1 }, /* deprecated */
+ { "proxy-password", 0, OPT_VALUE, "proxypasswd", -1 },
{ "proxy-user", 0, OPT_VALUE, "proxyuser", -1 },
{ "quiet", 'q', OPT_BOOLEAN, "quiet", -1 },
{ "quota", 'Q', OPT_VALUE, "quota", -1 },
{ "timeout", 'T', OPT_VALUE, "timeout", -1 },
{ "timestamping", 'N', OPT_BOOLEAN, "timestamping", -1 },
{ "tries", 't', OPT_VALUE, "tries", -1 },
+ { "user", 0, OPT_VALUE, "user", -1 },
{ "user-agent", 'U', OPT_VALUE, "useragent", -1 },
{ "verbose", 'v', OPT_BOOLEAN, "verbose", -1 },
{ "verbose", 0, OPT_BOOLEAN, "verbose", -1 },
N_("\
--http-user=USER set http user to USER.\n"),
N_("\
- --http-passwd=PASS set http password to PASS.\n"),
+ --http-password=PASS set http password to PASS.\n"),
N_("\
--no-cache disallow server-cached data.\n"),
N_("\
N_("\
--proxy-user=USER set USER as proxy username.\n"),
N_("\
- --proxy-passwd=PASS set PASS as proxy password.\n"),
+ --proxy-password=PASS set PASS as proxy password.\n"),
N_("\
--referer=URL include `Referer: URL' header in HTTP request.\n"),
N_("\
N_("\
FTP options:\n"),
+ N_("\
+ --ftp-user=USER set ftp user to USER.\n"),
+ N_("\
+ --ftp-password=PASS set ftp password to PASS.\n"),
N_("\
--no-remove-listing don't remove `.listing' files.\n"),
N_("\
char *output_document; /* The output file to which the
documents will be printed. */
+ char *user; /* Generic username */
+ char *passwd; /* Generic password */
+
int always_rest; /* Always use REST. */
- char *ftp_acc; /* FTP username */
- char *ftp_pass; /* FTP password */
+ char *ftp_user; /* FTP username */
+ char *ftp_passwd; /* FTP password */
int netrc; /* Whether to read .netrc. */
int ftp_glob; /* FTP globbing */
int ftp_pasv; /* Passive FTP. */
- char *http_user; /* HTTP user. */
+ char *http_user; /* HTTP username. */
char *http_passwd; /* HTTP password. */
char **user_headers; /* User-defined header(s). */
int http_keep_alive; /* whether we use keep-alive */