Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

LWP::UserAgent: Basic Authorisation Bug

27 views
Skip to first unread message

Michael Schilli

unread,
Jan 15, 1999, 3:00:00 AM1/15/99
to
Hi Gisle, hi folks,

LWP::UserAgent changed from version 1.62 to 1.64 in that the
basic authorisation scheme does no longer work as expected
(and documented):

credentials("http://abc.com", "realm", "uname", "passwd");

does no longer work, it has to be

credentials("http://abc.com:80", "realm", "uname", "passwd");

Otherwise the user agent won't provide the authorisation information
necessary and the request will fail.

The reason for this is line 404 in LWP::UserAgent 1.64 which is
now

my $host_port = $uri->host_port;

instead of

my $host_port = $uri->netloc;

as of version 1.62. Is this intended? I for sure was confused and it
took me quite a while to figure out why my scripts wouldn't run
anymore.

Just to let you know!

-- Mike

0 new messages