I'm trying to access URL with SSL + basic authentication.
I wrote a script as follows;
**************************************
#!/usr/local/bin/perl
use LWP::UserAgent;
use HTTP::Request;
use HTTP::Response;
use HTML::Parse;
use HTML::FormatText;
$URL = $ARGV[0];
my $ua = new LWP::UserAgent;
$ua->agent("Mozilla/4.0", $ua->agent);
my $req = new HTTP::Request('GET', $URL);
$HTTP_UID = 'user1';
$HTTP_PWD = 'user1';
$req->authorization_basic($HTTP_UID, $HTTP_PWD);
$resp = $ua->request($req);
if ($resp->is_success) {
print "SUCCESS\n";
} else {
print "FAILED\n";
print $resp->error_as_HTML;
}
***************************************
This script works for normal http with basic authentication, and also works for
SSL without any authentication.
But for SSL with basic authentication, 401 error is returned.
What is wrong??
I installed Perl5.005+LWP5.48 & Crypt-SSLeay0.16+OpenSSL0.94 on AIX4.3.
Any help appreciated.
Thanks in advance.
