Le 07-10-26 à 16:15, Cyrus Daboo a écrit :

Hi Pascal,

--On October 26, 2007 3:42:20 PM -0400 Pascal Robert <[EMAIL PROTECTED]> wrote:

I'm trying to talk to iCal Server from a WebObjects app with CalDAV4J
(Java API from the Chandler Project). I can connect and get a specific
calendar, but I'm trying to do a REPORT request:

        REPORT /calendars/users/diradmin/calendar/ HTTP/1.1

and I'm getting a 401 HTTP error:

        HTTP/1.1 401 Unauthorized
        WWW-Authenticate: digest nonce="174385117913098369521756197356",
realm="/Search", algorithm="md5"

In the Chandler examples, they are querying "/cosmo/dav/test/ collection",
so I guess I'm not querying the good thing or I don't understand the
REPORT query.  What is the correct URL for a REPORT query ?

Actually the error is caused by you trying to access a protected resource without authentication. The server is responding with the proper 401 code plus a WWW-Authenticate header that should trigger your client library to authenticate.

Perhaps CalDAV4J does not support digest authentication, which is the only one being advertised by the server? If so, you will need to manually edit the server's caldavd.plist configuration file and enable Basic authentication (which I am guessing CalDAV4J does support).

Ok, I was able to get Digest working by setting setDoAuthentification, but it seems CalDAV4J is having problem with the REPORT request :

192.168.003.143.60372-192.168.003.015.08008: REPORT /calendars/users/ diradmin/calendar/ HTTP/1.1
User-Agent: Jakarta Commons-HttpClient/3.1
Authorization: Digest username="diradmin", realm="/Search", nonce="2006034310142261744877882846", uri="/calendars/users/diradmin/ calendar/", response="e5b06f489602e85901f27c4b1d5ac4d5", algorithm="md5"
Host: g3test.os.lan:8008
Depth: 1

And I get a 400 error code, because the actual request is not complete. I should see something like this in the request ?

<?xml version="1.0"?>
   <C:calendar-query xmlns:C="urn:ietf:params:xml:ns:caldav">
       <D:prop xmlns:D="DAV:">
           <C:calendar-data/>
       </D:prop>
       <C:filter>
           <C:comp-filter name="VCALENDAR">
               <C:comp-filter name="VEVENT">
<C:time-range start="20060101T000000Z" end="20060107T000000Z"/>
               </C:comp-filter>
           </C:comp-filter>
       </C:filter>
   </C:calendar-query>

_______________________________________________
calendarserver-users mailing list
calendarserver-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo/calendarserver-users

Reply via email to