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>
|
||||
|
||||
* 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;
|
||||
}
|
||||
|
||||
/* Skip the username and password, if present here. The function
|
||||
should *not* be called with the complete URL, but with the part
|
||||
right after the scheme.
|
||||
/* Skip the username and password, if present in the URL. The
|
||||
function should *not* be called with the complete URL, but with the
|
||||
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 *
|
||||
url_skip_credentials (const char *url)
|
||||
@ -490,7 +490,7 @@ url_skip_credentials (const char *url)
|
||||
'#', or ';'. */
|
||||
const char *p = (const char *)strpbrk (url, "@/?#;");
|
||||
if (!p || *p != '@')
|
||||
return p;
|
||||
return url;
|
||||
return p + 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user