]> sjero.net Git - wget/commitdiff
Make --auth-no-challenge work with user:pass@ in URLs.
authorSaint Xavier <wget@sxav.eu>
Tue, 11 Nov 2008 07:17:17 +0000 (23:17 -0800)
committerSaint Xavier <wget@sxav.eu>
Tue, 11 Nov 2008 07:17:17 +0000 (23:17 -0800)
src/ChangeLog
src/http.c

index c7a378eae1d331248c50443e98030a310daff6f0..12a77e5f505461e863aee1c61265f7c48ab14e08 100644 (file)
@@ -1,3 +1,7 @@
+2008-11-10  Saint Xavier  <wget@sxav.eu>
+
+       * http.c: Make --auth-no-challenge works with user:pass@ in URLs.
+
 2008-11-05  Micah Cowan  <micah@cowan.name>
 
        * ftp.c (print_length): Should print humanized "size remaining"
index 52f65fed9215cd8381a427c3eeb480648fef0405..0866f92287bc9a106d2c117e9f9ff05c9ead5a63 100644 (file)
@@ -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. */