in reply to WEBSweeper Proxy Authentication
It's pretty easy, you're using all the right tools, but you're missing one (not really) so check it out.
update:use MIME::Base64; use HTTP::Request; use LWP::UserAgent; sub IamGET { my ($url, $domain, $user, $pass) = @_; my $REQ = HTTP::Request->new(GET => $url); my $authString = encode_base64("$domain/$user:$pass"); $REQ->push_header("Proxy-Authorization", "Basic $authString"); my $UA = LWP::UserAgent->new; $UA->agent("Mozilla/6.9(${^O};retmaspod)"); my $RES = $UA->request($REQ); if($RES->is_success()) { return $RES->content; } else { $! = " Error (".scalar(localtime())."):". $RES->status_line . +"\n"; return undef; } }
Check out this for ideas on where you stand.
LWP::UserAgent only supports basic http authentication. If you still need to use NTLM, check cpan. Since it is an HTTP protocol, you can probably find an RFC somewhere, and push whatever extra headers it reqires, which you can do using the method I demonstrated above. You might wanna also check out http://squid.sourceforge.net/ntlm/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: WEBSweeper Proxy Authentication
by simon.proctor (Vicar) on Jul 17, 2002 at 11:00 UTC |