Hi Monks,
I'm trying to use HTTP::DAV (v0.34) to pull files from SharePoint via the webdav interface. I'm running into what I believe are authentication problems (server error 401.2) on a simple open call. I get the same results when running on windows or linux. Our IIS server is configured to use Negotiate (Kerberos) for authentication with NTLM available as a backup. Both Authen::NTLM and LWP::Authen::Negotiate are installed. At this point, the script is pretty simple and follows the example:
#!/usr/bin/perl -w
use strict;
use HTTP::DAV;
my $d = new HTTP::DAV;
my $url = "http://myurl";
my $file = "myfile.xls";
$d->DebugLevel(3);
$d->credentials(-realm => "myrealm",-user=>"myusername",-pass =>"mypas
+sword" );
$d->open( -url=>"$url" );
print $d->message . "\n";
Based on looking at packet captures and the debug data, it seems like the HTTP::DAV module is not passing the specified credentials. It appears that module just stops at receiving the initial unauthorized response from the server instead of continuing with the handshake and choosing an authentication protocol.
Has anyone had any luck with using HTTP::DAV to interface with SharePoint 2007 where Negotiate/NTLM authentication is involved? Is there something obvious that I'm missing? Any ideas?
Thanks in advance for your help.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.