(fwd) LWP::UserAgent: Basic Authorisation Bug

Michael Schilli (schilli@tep.e-technik.tu-muenchen.de)
Fri, 15 Jan 1999 22:58:44 +0100


Path: lrz-muenchen.de!schilli
From: schilli@tep.e-technik.tu-muenchen.de. (Michael Schilli)
Newsgroups: comp.lang.perl.misc
Subject: LWP::UserAgent: Basic Authorisation Bug
Date: 15 Jan 1999 20:05:13 GMT
Organization: Lehrstuhl fuer Technische Elektrophysik
Lines: 31
Distribution: world
Message-ID: <77o71p$ka3$1@sparcserver.lrz-muenchen.de>
NNTP-Posting-Host: ares.tep.e-technik.tu-muenchen.de
X-Newsreader: TIN [version 1.2 PL2]
Xref: lrz-muenchen.de comp.lang.perl.misc:191499

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

--
Michael 

--------------------------------------------------------------------------
  Michael Schilli                     More Info:   http://perlmeister.com
--------------------------------------------------------------------------