in reply to Re^2: WWW::Mechanize Problem
in thread WWW::Mechanize Problem

The server says
WWW-Authenticate: NTLM

to which LWP adds

Client-Warning: Unsupported authentication scheme 'ntlm'

Use LWP::Authen::Ntlm as I previously mentioned.

It looks like it also supports the less secure Basic authentication. But since you need to provide the credentials using the credentials method either way, use the more secure ::Ntlm.

PS - On PerlMonks, you'll save yourself trouble by placing computer text (code, data, output) in <c>...</c> tags. They handle line breaks and escaping of special characters for you.

Replies are listed 'Best First'.
Re^4: WWW::Mechanize Problem
by venkatesan_G02 (Sexton) on Apr 07, 2009 at 16:09 UTC
    Hi,
    I included the module LWP::Authen::Ntlm in my code but i am getting an error "Can't locate Authen/NTLM.pm in @INC". But i checked that the file Ntlm.pm is present under LWP/Authen folder. Please advice
        Is there any way of making my code work.

        I have given the code below
        #!C:/Perl/bin/perl.exe use LWP::Simple; use LWP::UserAgent; use HTTP::Request; use HTTP::Response; use HTML::LinkExtor; use LWP::Authen::Ntlm; my $URL= "http://eonet.level3.com/"; $browser = LWP::UserAgent->new(); $browser->timeout(10); my $request = HTTP::Request->new(GET => $URL); my $response = $browser->request($request); if ($response->is_error()) {printf "%s\n", $response->status_line;} $contents = $response->content(); #print $contents; print $response->status_line(), "\n"; print $response->headers()->as_string();
        Please help!!!