LWP and Digest authentication
- From: earwigtc@xxxxxxxxx
- Date: 8 Feb 2007 10:50:08 -0800
Hi all. I must be missing something here. Is LWP supposed to
automatically deal with digest authentication? I run the following
code (used often with basic auth) against a server requiring digest,
and continue to get 401s:
my $ua = new LWP::UserAgent;
my $h = HTTP::Headers->new();
$h->authorization_basic('user','password');
my $req = HTTP::Request->new('GET', 'http://the.website.com',
$h);
my $res = $ua->request($req);
A sniff shows only one attempt to login, and no reaction to the fact
that the server returned a WWW-Authenticate header with the real,
nonce, etc. Do I need to call requests a different way to get the
auto-magical behavior? I'm using htis format because of other needs
(custom headers later).
Since I can't find any discussion or example of digest instead of
basic, I figured it should work. Or do I need to do all the digest
legwork myself?
Thanks.
.
- Follow-Ups:
- Re: LWP and Digest authentication
- From: Peter Scott
- Re: LWP and Digest authentication
- Prev by Date: Re: system return value?
- Next by Date: Re: Error installing Net::SSH2
- Previous by thread: Error installing Net::SSH2
- Next by thread: Re: LWP and Digest authentication
- Index(es):
Relevant Pages
|
|