it either tries to connect directly to port 80 or through proxy if HTTP_PROXY is set in /etc/gentoo-stats/gentoo-stats.conf. gentoo-stats-0.4 Reproducible: Always Steps to Reproduce: 1. Just run gentoo-stats while being behind proxy 2. 3. proposed solution is to add HTTP_PROXY_USER and HTTP_USER_PASS to conf file and handle it like that: --- /usr/sbin/gentoo-stats 2003-09-15 09:28:33.000000000 +0300 +++ ./gentoo-stats 2003-09-15 20:09:16.000000000 +0300 @@ -472,6 +472,8 @@ %conf->{'EMAIL'} = ''; %conf->{'ALLOW_DEVS'} = 0; %conf->{'HTTP_PROXY'} = ''; + %conf->{'HTTP_PROXY_USER'} = ''; + %conf->{'HTTP_PROXY_PASS'} = ''; open(FILE, '/etc/gentoo-stats/gentoo-stats.conf') || die('couldn\'t open /etc/gentoo-stats/gentoo-stats.conf'); @@ -530,6 +532,14 @@ { %conf->{'HTTP_PROXY'} = $val; } + elsif ($key eq 'HTTP_PROXY_USER') + { + %conf->{'HTTP_PROXY_USER'} = $val; + } + elsif ($key eq 'HTTP_PROXY_PASS') + { + %conf->{'HTTP_PROXY_PASS'} = $val; + } } } @@ -567,7 +577,12 @@ { $ua->proxy('http', %config->{'HTTP_PROXY'}); } - $resp = $ua->request(GET 'http://stats.gentoo.org/servlet/org.gentoo.stats.NewUserServlet'); + $req = HTTP::Request->new('GET','http://stats.gentoo.org/servlet/org.gentoo.stats.NewUserServlet'); + if (%config->{'HTTP_PROXY_USER'} ne '') + { + $req->proxy_authorization_basic(%config->{'HTTP_PROXY_USER'}, %config->{'HTTP_PROXY_PASS'}); + } + $resp = $ua->request($req); $s = $resp->content; if ($s =~ /Your new system ID is/s)
*** This bug has been marked as a duplicate of 30923 ***