From: Saint Xavier Date: Wed, 23 Jul 2008 22:58:10 +0000 (+0200) Subject: Automated merge. X-Git-Tag: v1.13~338^2~7^2~6^2~13 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=ccd62071dcbdfc0269813746b9f51ff9c23261db Automated merge. --- ccd62071dcbdfc0269813746b9f51ff9c23261db diff --cc src/ChangeLog index 3e08d0d8,02bc331b..fd86c51c --- a/src/ChangeLog +++ b/src/ChangeLog @@@ -1,12 -1,11 +1,20 @@@ +2008-07-17 Steven Schubiger + + * retr.c (retrieve_from_file): When given an URL as input file, + use it as baseref if none was specified and treat the input file + as HTML if its content type is text/html. + + * init.c (cleanup): Free the memory associated with the base + option (when DEBUG_MALLOC is defined). + + 2008-07-02 Xavier Saint + + * iri.c, iri.h : New function idn_decode() to decode ASCII + encoded hostname to the locale. + + * host.c : Show hostname to be resolved both in locale and + ASCII encoded. + 2008-06-28 Steven Schubiger * retr.c (retrieve_from_file): Allow for reading the links from diff --cc src/retr.c index 0fc46837,e70f6e6e..ae8ef3ef --- a/src/retr.c +++ b/src/retr.c @@@ -827,21 -855,16 +855,24 @@@ retrieve_from_file (const char *file, b status = RETROK; /* Suppose everything is OK. */ *count = 0; /* Reset the URL count. */ - + + /* sXXXav : Assume filename and links in the file are in the locale */ + set_content_encoding (iri, opt.locale); + if (url_has_scheme (url)) { + int dt; uerr_t status; - status = retrieve_url (url, &input_file, NULL, NULL, NULL, false, iri); + + if (!opt.base_href) + opt.base_href = xstrdup (url); + - status = retrieve_url (url, &input_file, NULL, NULL, &dt, false); ++ status = retrieve_url (url, &input_file, NULL, NULL, &dt, false, iri); if (status != RETROK) return status; + + if (dt & TEXTHTML) + html = true; } else input_file = (char *) file;