mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
Check stricter for supported URL scheme.
This commit is contained in:
parent
f391a5b5b0
commit
33d8b23dfd
@ -1,3 +1,12 @@
|
||||
2010-03-02 Steven Schubiger <stsc@member.fsf.org>
|
||||
|
||||
* retr.c (retrieve_from_file): Improve checking for a URL
|
||||
by invoking url_valid_scheme instead of url_has_scheme.
|
||||
|
||||
* url.c (url_valid_scheme): New function.
|
||||
|
||||
* url.h: Add declaration for url_valid_scheme.
|
||||
|
||||
2010-03-02 Steven Schubiger <stsc@member.fsf.org>
|
||||
|
||||
* retr.c (retrieve_from_file): Free memory of input file.
|
||||
|
@ -899,7 +899,7 @@ retrieve_from_file (const char *file, bool html, int *count)
|
||||
set_uri_encoding (iri, opt.locale, true);
|
||||
set_content_encoding (iri, opt.locale);
|
||||
|
||||
if (url_has_scheme (url))
|
||||
if (url_valid_scheme (url))
|
||||
{
|
||||
int dt,url_err;
|
||||
uerr_t status;
|
||||
|
@ -463,6 +463,13 @@ url_has_scheme (const char *url)
|
||||
return *p == ':';
|
||||
}
|
||||
|
||||
bool
|
||||
url_valid_scheme (const char *url)
|
||||
{
|
||||
enum url_scheme scheme = url_scheme (url);
|
||||
return scheme != SCHEME_INVALID;
|
||||
}
|
||||
|
||||
int
|
||||
scheme_default_port (enum url_scheme scheme)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user