I've experienced problems using $ua->credentials().
Try using $request->authorization_basic($username, $password) which seems to
work much better.
Bernie
-----Original Message-----
From: Jim Kinsey <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Monday, July 03, 2000 8:50 AM
Subject: UserAgent mirror and credentials
>Hi;
>
>I am currently using a script which mirrors a file from a URL using the
>LWP::UserAgent mirror function, but which needs to supply credentials to
>access this file. I know the credentials I am using are correct, having
>tested them in other code, but they seem wholly ineffective when using the
>mirror function. Does this not take credentials into account?
>
>The code I am using is (a bit edited):
>
>...
>my $ua = LWP::UserAgent->new();
>$ua->credentials("www5.mydomain.com","A Realm","username","password");
>$ua->proxy(['http'] => 'http://proxy.mydomain.com:80');
>$response = $ua->mirror($URL, $MIRROR);
>...
>
>Any suggestions as to why this wouldn't be working?
>
>Thanks
>
>Jim
>
>Jim Kinsey->[EMAIL PROTECTED]
>BBC NewsOnline->Trainee Web Developer
>
>
>This e-mail, and any attachment, is confidential. If you have received it
in error, please delete it from your system, do not use or disclose the
information in any way, and notify me immediately. The contents of this
message may contain personal views which are not the views of the BBC,
unless specifically stated.