mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
stsc: -i URL improvements.
This commit is contained in:
parent
b28a6abfe6
commit
e4371807f6
@ -1,3 +1,10 @@
|
|||||||
|
2008-07-17 Steven Schubiger <stsc@members.fsf.org>
|
||||||
|
|
||||||
|
* wget.texi (Logging and Input File Options): Document
|
||||||
|
for --input-file and according remote input file URLs, the
|
||||||
|
implicit enforcement of treating a document as HTML and
|
||||||
|
the possible baseref assumption.
|
||||||
|
|
||||||
2008-06-29 Micah Cowan <micah@cowan.name>
|
2008-06-29 Micah Cowan <micah@cowan.name>
|
||||||
|
|
||||||
* wget.texi <Contributors>: Added Joao Ferreira, Mike Frysinger,
|
* wget.texi <Contributors>: Added Joao Ferreira, Mike Frysinger,
|
||||||
|
@ -497,6 +497,11 @@ relative links, which you can solve either by adding @code{<base
|
|||||||
href="@var{url}">} to the documents or by specifying
|
href="@var{url}">} to the documents or by specifying
|
||||||
@samp{--base=@var{url}} on the command line.
|
@samp{--base=@var{url}} on the command line.
|
||||||
|
|
||||||
|
If the @var{file} is an external one, the document will be automatically
|
||||||
|
treated as @samp{html} if the Content-Type matches @samp{text/html}.
|
||||||
|
Furthermore, the @var{file}'s location will be implicitly used as base
|
||||||
|
href if none was specified.
|
||||||
|
|
||||||
@cindex force html
|
@cindex force html
|
||||||
@item -F
|
@item -F
|
||||||
@itemx --force-html
|
@itemx --force-html
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2008-07-17 Steven Schubiger <stsc@members.fsf.org>
|
||||||
|
|
||||||
|
* 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-06-28 Steven Schubiger <stsc@members.fsf.org>
|
2008-06-28 Steven Schubiger <stsc@members.fsf.org>
|
||||||
|
|
||||||
* retr.c (retrieve_from_file): Allow for reading the links from
|
* retr.c (retrieve_from_file): Allow for reading the links from
|
||||||
|
@ -1548,6 +1548,8 @@ cleanup (void)
|
|||||||
xfree_null (opt.cookies_output);
|
xfree_null (opt.cookies_output);
|
||||||
xfree_null (opt.user);
|
xfree_null (opt.user);
|
||||||
xfree_null (opt.passwd);
|
xfree_null (opt.passwd);
|
||||||
|
xfree_null (opt.base_href);
|
||||||
|
|
||||||
#endif /* DEBUG_MALLOC */
|
#endif /* DEBUG_MALLOC */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
10
src/retr.c
10
src/retr.c
@ -830,10 +830,18 @@ retrieve_from_file (const char *file, bool html, int *count)
|
|||||||
|
|
||||||
if (url_has_scheme (url))
|
if (url_has_scheme (url))
|
||||||
{
|
{
|
||||||
|
int dt;
|
||||||
uerr_t status;
|
uerr_t status;
|
||||||
status = retrieve_url (url, &input_file, NULL, NULL, NULL, false);
|
|
||||||
|
if (!opt.base_href)
|
||||||
|
opt.base_href = xstrdup (url);
|
||||||
|
|
||||||
|
status = retrieve_url (url, &input_file, NULL, NULL, &dt, false);
|
||||||
if (status != RETROK)
|
if (status != RETROK)
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
|
if (dt & TEXTHTML)
|
||||||
|
html = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
input_file = (char *) file;
|
input_file = (char *) file;
|
||||||
|
Loading…
Reference in New Issue
Block a user