X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fhttp.c;h=0866f92287bc9a106d2c117e9f9ff05c9ead5a63;hp=52f65fed9215cd8381a427c3eeb480648fef0405;hb=65ab102f072cd801528da4f478915bd8e5272725;hpb=662da5e235618c28b9348bcd23133d95c079f0d4 diff --git a/src/http.c b/src/http.c index 52f65fed..0866f922 100644 --- a/src/http.c +++ b/src/http.c @@ -1495,9 +1495,10 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy) user = user ? user : (opt.http_user ? opt.http_user : opt.user); passwd = passwd ? passwd : (opt.http_passwd ? opt.http_passwd : opt.passwd); - if (user && passwd - && !u->user) /* We only do "site-wide" authentication with "global" - user/password values; URL user/password info overrides. */ + /* We only do "site-wide" authentication with "global" user/password + * values unless --auth-no-challange has been requested; URL user/password + * info overrides. */ + if (user && passwd && (!u->user || opt.auth_without_challenge)) { /* If this is a host for which we've already received a Basic * challenge, we'll go ahead and send Basic authentication creds. */