Skip Menu |

This queue is for tickets about the CPAN CPAN distribution.

Report information
The Basics
Id: 80662
Status: new
Priority: 0/
Queue: CPAN

Owner: Nobody in particular
Requestors: bohica [...]

Bug Information
Severity: (no value)
Broken in: 1.9800
Fixed in: (no value)

Subject: "reports" doesn't seem to use HTTP proxy settings
Download (untitled) / with headers
text/plain 1.6k
I have http_proxy env var set to http://squid.easysoft.local:8080 (which is my correct proxy server) and also http_proxy in my config: cpan[4]> o conf http_proxy http_proxy [http://squid.easysoft.local:8080] however when I run reports I get: cpan[6]> reports MJEVANS/DBD-ODBC-1.41.tar.gz Distribution: M/MJ/MJEVANS/DBD-ODBC-1.41.tar.gz path M/MJ/MJEVANS/DBD-ODBC-1.41.tar.gz Fetching ''... Could not download '': 500 Can't connect to (Connection refused) NOTE: the last argument in the error is LWP::UserAgent message which I added to CPAN::Distribution since error 500 is meanginless (it would be worth doing this anyway): $CPAN::Frontend->myprint("Fetching '$url'..."); my $resp = $Ua->get($url); unless ($resp->is_success) { $CPAN::Frontend->mydie(sprintf "Could not download '%s': %s %s\n", $url, $resp->code, $resp->message); I also added: my $Ua; eval { $Ua = CPAN::LWP::UserAgent->new;}; if ($@) { $CPAN::Frontend->mydie("CPAN::LWP::UserAgent->new dies with $@\n"); } # added the following 2 lines use Data::Dumper; $CPAN::Frontend->myprint("proxy is " . Dumper($Ua->proxy(['http'])) . "\n"); and they output: proxy is $VAR1 = undef; suggesting a proxy server is not being set on the LWP::UserAgent in the reports sub. I verified this is probably the case since adding $Ua- Show quoted text
>env_proxy to the end of the above eval made it work but it should
probably pull the proxy setting from the CPAN config. Martin -- Martin J. Evans Wetherby, UK

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to