Thanks Axel !
You are right, it is a regression introduced ~ half a year ago.
Could you try this patch ?
Tim
On Monday 23 November 2015 15:16:41 Axel Reinhold wrote:
> Dear wget-Maintainers,
>
> wget-1.17 does not more use .netrc for getting http-auth-info
> this is a regression i think.
>
> ======================================================================
> with wget-1.17:
> ======================================================================
> $ /opt/wget/bin/wget -v -O- http://calea.wpack.de/sites/active
> ======================================================================
> --2015-11-23 15:11:05-- http://calea.wpack.de/sites/active
> Resolving calea.wpack.de (calea.wpack.de)... 188.138.31.224
> Connecting to calea.wpack.de (calea.wpack.de)|188.138.31.224|:80...
> connected. HTTP request sent, awaiting response... 401 Unauthorized
> Username/Password Authentication Failed.
> ======================================================================
> $ /opt/wget/bin/wget --http-user=rcon --http-password=wefhhoG -O-
> http://calea.wpack.de/sites/active
> ======================================================================
> --2015-11-23 15:11:24-- http://calea.wpack.de/sites/active
> Resolving calea.wpack.de (calea.wpack.de)... 188.138.31.224
> Connecting to calea.wpack.de (calea.wpack.de)|188.138.31.224|:80...
> connected. HTTP request sent, awaiting response... 401 Unauthorized
> Authentication selected: Digest realm="wpack",
> nonce="a1LgzDUlBQA=54905863b96f04dca4ae0810eb594fdcf4066221",
> algorithm=MD5, qop="auth" Reusing existing connection to calea.wpack.de:80.
> HTTP request sent, awaiting response... 200 OK
> Length: 146 [text/html]
> Saving to: 'STDOUT'
> - 0%[
> ] 0 --.-KB/s 1 city7 201511231325
> city7OKwp 212.114.252.79 City-Hotel München ***Superior 7 bambini
> 201511231326 Juli24Mg 84.57.88.108 Bambini Kinderwelt GmbH -
>
> 100%[============================================================>] 146
> --.-KB/s in 0s 2015-11-23 15:11:24 (15.5 MB/s) - written to stdout
> [146/146]
> ======================================================================
>
> ======================================================================
> with wget-1.16.3:
> ======================================================================
> $ /opt/wget/bin/wget -v -O- http://calea.wpack.de/sites/active
> ======================================================================
> --2015-11-23 15:14:01-- http://calea.wpack.de/sites/active
> Resolving calea.wpack.de (calea.wpack.de)... 188.138.31.224
> Connecting to calea.wpack.de (calea.wpack.de)|188.138.31.224|:80...
> connected. HTTP request sent, awaiting response... 401 Unauthorized
> Authentication selected: Digest realm="wpack",
> nonce="fnlD1jUlBQA=cbebe19e1ffead899e352fb4e77f5fd8d64803f6",
> algorithm=MD5, qop="auth" Reusing existing connection to calea.wpack.de:80.
> HTTP request sent, awaiting response... 200 OK
> Length: 146 [text/html]
> Saving to: 'STDOUT'
> - 0%[
> ] 0 --.-KB/s 1 city7 201511231325
> city7OKwp 212.114.252.79 City-Hotel München ***Superior 7 bambini
> 201511231326 Juli24Mg 84.57.88.108 Bambini Kinderwelt GmbH -
>
> 100%[============================================================>] 146
> --.-KB/s in 0s 2015-11-23 15:14:01 (13.9 MB/s) - written to stdout
> [146/146]
> ======================================================================
>From a1da7fd960dba9e733e36a47bf144827c7d0e154 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tim=20R=C3=BChsen?= <[email protected]>
Date: Mon, 23 Nov 2015 17:50:59 +0100
Subject: [PATCH] Fix regression in HTTP authentication
* src/http.c (initialize_request): Fix wrong params to search_netrc()
Regression introduced in commit 29850e77
---
src/http.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/http.c b/src/http.c
index 9d71483..8916d2b 100644
--- a/src/http.c
+++ b/src/http.c
@@ -1872,7 +1872,7 @@ initialize_request (struct url *u, struct http_stat *hs, int *dt, struct url *pr
/* Find the username and password for authentication. */
*user = u->user;
*passwd = u->passwd;
- search_netrc (u->host, (const char **)&user, (const char **)&passwd, 0);
+ search_netrc (u->host, (const char **)user, (const char **)passwd, 0);
*user = *user ? *user : (opt.http_user ? opt.http_user : opt.user);
*passwd = *passwd ? *passwd : (opt.http_passwd ? opt.http_passwd : opt.passwd);
--
2.6.2