libwww-curl-perl ntlm does not work
David Schneider
dsd31g at gmail.com
Fri Jan 13 09:05:14 UTC 2012
hey folks
libwww-curl-perl seems to have a bug. it sends basic insted of ntlm
header despite that i have defined the option CURLAUTH_NTLM
libwww-curl-perl 4.12-1
debian: squeeze
#!/usr/bin/perl
open(TMPF, ">", "tempfile");
print "User: ";
chomp($user = <STDIN>);
if (system("stty -echo") == 0){
print "Password: ";
chomp($pw = <STDIN>);
}else{
print "stty -echo failed";
exit 1;
}
system("stty echo");
use WWW::Curl::Easy;
my $curl = WWW::Curl::Easy->new;
$curl->setopt(CURLOPT_URL,'http://my_scure_ntlm_server.com/securedoument.txt');
$curl->setopt(CURLOPT_FOLLOWLOCATION,1);
$curl->setopt(CURLOPT_UNRESTRICTED_AUTH,1);
$curl->setopt(CURLOPT_HTTPAUTH,CURLAUTH_NTLM);
$curl->setopt(CURLOPT_USERPWD,$user . ':' . $pw);
$curl->setopt(CURLOPT_FILE,TMPF);
$curl->setopt(CURLOPT_VERBOSE,1)
my $retcode = $curl->perform;
close(TMPF);
regards dave
More information about the pkg-perl-maintainers
mailing list