2009-07-28 Micah Cowan <micah@cowan.name>
- * NEWS: Mention some more previously undocumented items, and the
- new "ascii" specifer for --restrict-file-names.
+ * NEWS: Mention some more previously undocumented items, the
+ new "ascii" specifer for --restrict-file-names, and the renaming
+ of --html-extension to --adjust-extension.
2009-07-27 Petr Pisar <petr.pisar@atlas.cz>
information on how it was built, and the set of configure-time options
that were selected.
+** --html-extension has been renamed to --adjust-extension, to reflect
+the fact that it now also applies to CSS content..
+
** An "ascii" specifier is now accepted by --restrict-file-names, which
forces the percent-encoding of all non-ASCII bytes
* wget.texi (Download Options): Document "lowercase", "uppercase",
and the new "ascii" specifier for --restrict-file-names.
+ (HTTP Options): Rename --html-extension to --adjust-extension.
+ (Wgetrc Commands): Rename html_extension to adjust_extension.
2009-07-26 Micah Cowan <micah@cowan.name>
URLs that end in a slash), instead of @file{index.html}.
@cindex .html extension
+@cindex .css extension
@item -E
-@itemx --html-extension
+@itemx --adjust-extension
If a file of type @samp{application/xhtml+xml} or @samp{text/html} is
downloaded and the URL does not end with the regexp
@samp{\.[Hh][Tt][Mm][Ll]?}, this option will cause the suffix @samp{.html}
Retrieval Options}).
As of version 1.12, Wget will also ensure that any downloaded files of
-type @samp{text/css} end in the suffix @samp{.css}. Obviously, this
-makes the name @samp{--html-extension} misleading; a better name is
-expected to be offered as an alternative in the near future.
+type @samp{text/css} end in the suffix @samp{.css}, and the option was
+renamed from @samp{--html-extension}, to better reflect its new
+behavior. The old option name is still acceptable, but should now be
+considered deprecated.
+
+At some point in the future, this option may well be expanded to
+include suffixes for other types of content, including content types
+that are not parsed by Wget.
@cindex http user
@cindex http password
If the local file already exists and @samp{--no-directories} was
specified, a numeric suffix will be appended to the original name.
@item
-If @samp{--html-extension} was specified, the local filename will have
+If @samp{--adjust-extension} was specified, the local filename might have
@samp{.html} appended to it. If Wget is invoked with @samp{-E -A.php},
a filename such as @samp{index.php} will match be accepted, but upon
download will be named @samp{index.php.html}, which no longer matches,
Define a header for HTTP downloads, like using
@samp{--header=@var{string}}.
-@item html_extension = on/off
+@item adjust_extension = on/off
Add a @samp{.html} extension to @samp{text/html} or
-@samp{application/xhtml+xml} files without it, or a @samp{.css}
-extension to @samp{text/css} files without it, like @samp{-E}.
+@samp{application/xhtml+xml} files that lack one, or a @samp{.css}
+extension to @samp{text/css} files that lack one, like
+@samp{-E}. Previously named @samp{html_extension} (still acceptable,
+but deprecated).
@item http_keep_alive = on/off
Turn the keep-alive feature on or off (defaults to on). Turning it
+2009-07-28 Micah Cowan <micah@cowan.name>
+
+ * main.c (option_data): Rename --html-extension to
+ --adjust-extension.
+ (print_help): Ditto.
+
+ * options.h (struct option): Rename html_extension to
+ adjust_extension.
+ * http.c (gethttp): Ditto.
+ * convert.c (local_quote_string): Ditto.
+
+ * init.c (commands): Add "adjustextension", and reflect rename
+ change for opt.adjust_extension, for both "adjustextension" and
+ "htmlextension".
+
2009-07-27 Micah Cowan <micah@cowan.name>
* options.h (struct options): Added restrict_files_nonascii
We quote ? as %3F to avoid passing part of the file name as the
parameter when browsing the converted file through HTTP. However,
- it is safe to do this only when `--html-extension' is turned on.
+ it is safe to do this only when `--adjust-extension' is turned on.
This is because converting "index.html?foo=bar" to
"index.html%3Ffoo=bar" would break local browsing, as the latter
isn't even recognized as an HTML file! However, converting
*to++ = '3';
break;
case '?':
- if (opt.html_extension)
+ if (opt.adjust_extension)
{
*to++ = '%';
*to++ = '3';
else
*dt &= ~TEXTCSS;
- if (opt.html_extension)
+ if (opt.adjust_extension)
{
if (*dt & TEXTHTML)
- /* -E / --html-extension / html_extension = on was specified,
+ /* -E / --adjust-extension / adjust_extension = on was specified,
and this is a text/html file. If some case-insensitive
variation on ".htm[l]" isn't already the file's suffix,
tack on ".html". */
/* KEEP THIS LIST ALPHABETICALLY SORTED */
{ "accept", &opt.accepts, cmd_vector },
{ "addhostdir", &opt.add_hostdir, cmd_boolean },
+ { "adjustextension", &opt.adjust_extension, cmd_boolean },
{ "alwaysrest", &opt.always_rest, cmd_boolean }, /* deprecated */
{ "askpassword", &opt.ask_passwd, cmd_boolean },
{ "authnochallenge", &opt.auth_without_challenge,
{ "ftpuser", &opt.ftp_user, cmd_string },
{ "glob", &opt.ftp_glob, cmd_boolean },
{ "header", NULL, cmd_spec_header },
- { "htmlextension", &opt.html_extension, cmd_boolean },
+ { "htmlextension", &opt.adjust_extension, cmd_boolean },
{ "htmlify", NULL, cmd_spec_htmlify },
{ "httpkeepalive", &opt.http_keep_alive, cmd_boolean },
{ "httppasswd", &opt.http_passwd, cmd_string }, /* deprecated */
static struct cmdline_option option_data[] =
{
{ "accept", 'A', OPT_VALUE, "accept", -1 },
+ { "adjust-extension", 'E', OPT_BOOLEAN, "adjustextension", -1 },
{ "append-output", 'a', OPT__APPEND_OUTPUT, NULL, required_argument },
{ "ask-password", 0, OPT_BOOLEAN, "askpassword", -1 },
{ "auth-no-challenge", 0, OPT_BOOLEAN, "authnochallenge", -1 },
{ "header", 0, OPT_VALUE, "header", -1 },
{ "help", 'h', OPT_FUNCALL, (void *)print_help, no_argument },
{ "host-directories", 0, OPT_BOOLEAN, "addhostdir", -1 },
- { "html-extension", 'E', OPT_BOOLEAN, "htmlextension", -1 },
+ { "html-extension", 'E', OPT_BOOLEAN, "adjustextension", -1 },
{ "htmlify", 0, OPT_BOOLEAN, "htmlify", -1 },
{ "http-keep-alive", 0, OPT_BOOLEAN, "httpkeepalive", -1 },
{ "http-passwd", 0, OPT_VALUE, "httppassword", -1 }, /* deprecated */
--default-page=NAME Change the default page name (normally\n\
this is `index.html'.).\n"),
N_("\
- -E, --html-extension save HTML documents with `.html' extension.\n"),
+ -E, --adjust-extension save HTML/CSS documents with proper extensions.\n"),
N_("\
--ignore-length ignore `Content-Length' header field.\n"),
N_("\
bool delete_after; /* Whether the files will be deleted
after download. */
- bool html_extension; /* Use ".html" extension on all text/html? */
+ bool adjust_extension; /* Use ".html" extension on all text/html? */
bool page_requisites; /* Whether we need to download all files
necessary to display a page properly. */