Preceptor has asked for the wisdom of the Perl Monks concerning the following question:
This doesn't seem to help - I still get a '407 authorization required' although I can still request web pages through IE or Firefox. Firefox does request a username and password, and the best I can come up with is that I need to use NTLM authentication - but I can't seem to figure out how, and was wondering if anyone could shed some further light? (for bonus points, give me a hint as to how I get the CPAN module working again :))use LWP::UserAgent; use HTTP::Request::Common; my $url = 'http://www.bbc.co.uk/'; # Set up the ntlm client and then the base64 encoded ntlm handshake m +essage my $ua = new LWP::UserAgent(keep_alive=>1); #$ua -> proxy ('http', "http://my_domain\\myuser:mypass@myproxy:8080" + ); $ua -> proxy ('http', "http://myproxy:8080" ); $ua->credentials('www.bbc.co.uk:80', '', "mydomain\\myuser", 'mypass' +); $ua->credentials('myproxy:8080', '', "mydomain\\myuser", 'mypass'); $request = GET $url; print "--Performing request now...-----------\n"; $response = $ua->request($request); print "--Done with request-------------------\n"; if ($response->is_success) {print "It worked!->" . $response->code . +"\n"} else {print "It didn't work!->" . $response->code . "\n"}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Proxy authentication using NTLM?
by keszler (Priest) on Dec 18, 2009 at 13:10 UTC | |
by gmargo (Hermit) on Dec 18, 2009 at 14:10 UTC | |
|
Re: Proxy authentication using NTLM?
by Khen1950fx (Canon) on Dec 18, 2009 at 19:56 UTC |