1
0
mirror of https://github.com/mirror/wget.git synced 2025-04-24 12:10:16 +08:00

* src/http.c (initialize_request): Fix regression in .netrc auth

Reported-by: Axel Reinhold
This commit is contained in:
Tim Rühsen 2017-02-06 21:44:18 +01:00
parent 2ddd2b69e4
commit d061e553a1

View File

@ -1900,7 +1900,7 @@ initialize_request (const struct url *u, struct http_stat *hs, int *dt, struct u
*passwd = NULL;
/* Check for ~/.netrc if none of the above match */
if (opt.netrc && (!user || !passwd))
if (opt.netrc && (!user || (!passwd || !*passwd)))
search_netrc (u->host, (const char **) user, (const char **) passwd, 0);
/* We only do "site-wide" authentication with "global" user/password