mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Fixed return value; 'url' if no credentials.
This commit is contained in:
parent
8b30dbf8b5
commit
174fee5396
@ -1,3 +1,8 @@
|
|||||||
|
2003-12-15 Gisle Vanem <giva@bgnett.no>
|
||||||
|
|
||||||
|
* url.c (url_skip_credentials): Fixed return value; 'url' if no
|
||||||
|
credentials.
|
||||||
|
|
||||||
2003-12-14 Hrvoje Niksic <hniksic@xemacs.org>
|
2003-12-14 Hrvoje Niksic <hniksic@xemacs.org>
|
||||||
|
|
||||||
* url.c (url_skip_credentials): Return a pointer directly.
|
* url.c (url_skip_credentials): Return a pointer directly.
|
||||||
|
10
src/url.c
10
src/url.c
@ -477,11 +477,11 @@ scheme_disable (enum url_scheme scheme)
|
|||||||
supported_schemes[scheme].enabled = 0;
|
supported_schemes[scheme].enabled = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Skip the username and password, if present here. The function
|
/* Skip the username and password, if present in the URL. The
|
||||||
should *not* be called with the complete URL, but with the part
|
function should *not* be called with the complete URL, but with the
|
||||||
right after the scheme.
|
portion after the scheme.
|
||||||
|
|
||||||
If no username and password are found, return 0. */
|
If no username and password are found, return URL. */
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
url_skip_credentials (const char *url)
|
url_skip_credentials (const char *url)
|
||||||
@ -490,7 +490,7 @@ url_skip_credentials (const char *url)
|
|||||||
'#', or ';'. */
|
'#', or ';'. */
|
||||||
const char *p = (const char *)strpbrk (url, "@/?#;");
|
const char *p = (const char *)strpbrk (url, "@/?#;");
|
||||||
if (!p || *p != '@')
|
if (!p || *p != '@')
|
||||||
return p;
|
return url;
|
||||||
return p + 1;
|
return p + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user