From 65ab102f072cd801528da4f478915bd8e5272725 Mon Sep 17 00:00:00 2001 From: Saint Xavier Date: Mon, 10 Nov 2008 23:17:17 -0800 Subject: [PATCH] Make --auth-no-challenge work with user:pass@ in URLs. --- src/ChangeLog | 4 ++++ src/http.c | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index c7a378ea..12a77e5f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2008-11-10 Saint Xavier + + * http.c: Make --auth-no-challenge works with user:pass@ in URLs. + 2008-11-05 Micah Cowan * ftp.c (print_length): Should print humanized "size remaining" 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. */ -- 2.39.2