+2001-01-10 Dan Harkless <wget@harkless.org>
+
+ * url.c (str_url): Clarified this function's comment header after
+ Hrvoje answered my question on the list as to when hide != 1.
+ Also Hrvoje pointed out I need to use xstrdup() on the string literal.
+
2001-01-06 Hrvoje Niksic <hniksic@arsdigita.com>
* connect.c (bindport): Declare addrlen as int. Diagnosed by
return '\0';
}
\f
-/* Return the URL as fine-formed string, with a proper protocol,
- optional port number, directory and optional user/password. If
- HIDE is non-zero, password will be hidden. The forbidden
- characters in the URL will be cleansed. */
+/* Return the URL as fine-formed string, with a proper protocol, optional port
+ number, directory and optional user/password. If `hide' is non-zero (as it
+ is when we're calling this on a URL we plan to print, but not when calling it
+ to canonicalize a URL for use within the program), password will be hidden.
+ The forbidden characters in the URL will be cleansed. */
char *
str_url (const struct urlinfo *u, int hide)
{
shoulder (or in saved wget output). Don't give away the number of
characters in the password, either, as we did in past versions of
this code, when we replaced the password characters with 'x's. */
- passwd = "<password>";
+ passwd = xstrdup("<password>");
else
passwd = CLEANDUP (u->passwd);
}