I am trying to interface with our Scalix server's CalDAV implementation (http://www.scalix.com/wiki/index.php?title=TB/TB-2008-01-CALDAV) using HTTP::DAV. I am getting hung up early on with an authentication problem. The debugging output looks like the login details I set are being overridden. Here's my code (with actual server names, login details changed):
#!/usr/bin/perl -w
use strict;
use HTTP::DAV;
$\ = "\n";
my $uid = 'foo';
my $pwd = 'bar';
my $url =
'http://my.server.com/api/dav/Calendars/Users/Foo.User@server.com/Cale
+ndar';
my $d = new HTTP::DAV;
$d->DebugLevel( 3 );
$d->credentials( -user => $uid,
-pass => $pwd,
-url => $url
);
$d->open( -url => $url )
or die "Couldn't open $url: " . $d->message();
And here's the output:
Setting auth details for my.server.com:80, default to 'foo', 'bar'
new_resource: For
http://my.server.com/api/dav/Calendars/Users/Foo.User@server.com/Calen
+dar/, creating new resource
Resetting user and password for my.server.com:80, Scalix User
Using user/pass combo: . For Scalix User,
http://my.server.com/api/dav/Calendars/Users/Foo.User@server.com/Calen
+dar/
Couldn't open
http://my.server.com/api/dav/Calendars/Users/Foo.User@server.com/Calen
+dar: Unauthorized. at ./check_Cal.pl line 33.
It looks like it is changing the login cred to "Scalix User" for some reason. I am fairly new to DAV, and am wondering if the server causing this somehow, or if my code simply bites.
Thanks,
Mike
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.