From: hniksic Date: Mon, 15 Dec 2003 10:22:54 +0000 (-0800) Subject: [svn] Fixed return value; 'url' if no credentials. X-Git-Tag: v1.13~1330 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=174fee53960cee4cf011ff47156681fb6135d833 [svn] Fixed return value; 'url' if no credentials. --- diff --git a/src/ChangeLog b/src/ChangeLog index 5e8fd113..c88bd5e1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-12-15 Gisle Vanem + + * url.c (url_skip_credentials): Fixed return value; 'url' if no + credentials. + 2003-12-14 Hrvoje Niksic * url.c (url_skip_credentials): Return a pointer directly. diff --git a/src/url.c b/src/url.c index cc4c3f90..3bc357e4 100644 --- a/src/url.c +++ b/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; }