Subject: | LWP::Authen::Basic proxy authentication bug - proxy authentication not working |
Date: | Thu, 24 Sep 2015 15:42:51 +0200 |
To: | bug-libwww-perl [...] rt.cpan.org |
From: | Leon Juranic <leon.juranic [...] gmail.com> |
Hi,
I think there is a bug in LWP::Authen::Basic proxy authentication.
Basic proxy authentication didn't work for me on latest LWP /
LWP::Authen::Basic,
when proxy host:ip, user, password and realm are set via credentials()
function.
Problem is probably in Basic.pm on line:
...
my($user, $pass) = $ua->get_basic_credentials($realm, $url, $proxy);
...
If $proxy is set to true, function get_basic_credentials() from
UserAgent.pm will never return
user/pass combination for specific realm/url, instead, it will just do
"return if $proxy;", even if proxy requires authentication.
file UserAgent.pm:
sub get_basic_credentials
{
my($self, $realm, $uri, $proxy) = @_;
return if $proxy;
return $self->credentials($uri->host_port, $realm);
}
Regards,
Leon Juranic