Interactions with Apple Ical

Request:
PROPFIND
Depth: 0
Url /ucaldav/principals/users/douglm/
Content:
<?xml version="1.0" encoding="utf-8"?>
<x0:propfind xmlns:x2="http://calendarserver.org/ns/" xmlns:x1="urn:ietf:params:xml:ns:caldav" xmlns:x0="DAV:">
 <x0:prop>
  <x1:calendar-home-set/>
  <x1:calendar-user-address-set/>
  <x1:schedule-inbox-URL/>
  <x1:schedule-outbox-URL/>
  <x2:dropbox-home-URL/>
  <x2:notifications-URL/>
  <x0:displayname/>
 </x0:prop>
</x0:propfind>

Note: If the URL does not end in "/" then iCal fails with a "No calendar home" error

Response:
<?xml version="1.0" encoding="UTF-8" ?>

<multistatus xmlns:ns3="http://calendarserver.org/ns/" xmlns="DAV:" xmlns:ns1="urn:ietf:params:xml:ns:caldav" xmlns:ns2="http://www.w3.org/2002/12/cal/ical#">
  <response>
    <href>/ucaldav/principals/users/douglm/</href>
    <propstat>
      <prop>
        <ns1:calendar-home-set>
          <href>/ucaldav/user/douglm/</href>
        </ns1:calendar-home-set>
        <ns1:calendar-user-address-set>
          <href>mailto:douglm@mysite.edu</href>
        </ns1:calendar-user-address-set>
        <ns1:schedule-inbox-URL>
          <href>/ucaldav/user/douglm/Inbox/</href>
        </ns1:schedule-inbox-URL>
        <ns1:schedule-outbox-URL>
          <href>/ucaldav/user/douglm/Outbox/</href>
        </ns1:schedule-outbox-URL>
        <displayname>douglm</displayname>
      </prop>
      <status>HTTP/1.1 200 ok</status>
    </propstat>
    <propstat>
      <prop>
        <ns3:dropbox-home-URL/>
        <ns3:notifications-URL/>
      </prop>
      <status>HTTP/1.1 404 not_found</status>
    </propstat>
  </response>
</multistatus>

Ical then repeats the above unchanged.

Request:
PROPFIND
Depth 1
Url: /ucaldav/user/douglm/
Content:
<?xml version="1.0" encoding="utf-8"?>
<x0:propfind xmlns:x1="http://calendarserver.org/ns/" xmlns:x0="DAV:" xmlns:x3="http://apple.com/ns/ical/" xmlns:x2="urn:ietf:params:xml:ns:caldav">
 <x0:prop>
  <x1:getctag/>
  <x0:displayname/>
  <x2:calendar-description/>
  <x3:calendar-color/>
  <x3:calendar-order/>
  <x0:resourcetype/>
  <x2:calendar-free-busy-set/>
 </x0:prop>
</x0:propfind>

This Depth 1 propfind want the properties of the home directory and the resources immediately below

Response:
<?xml version="1.0" encoding="UTF-8" ?>

<multistatus xmlns:ns4="http://apple.com/ns/ical/" xmlns:ns3="http://calendarserver.org/ns/" xmlns="DAV:" xmlns:ns1="urn:ietf:params:xml:ns:caldav" xmlns:ns2="http://www.w3.org/2002/12/cal/ical#">
  <response>
    <href>/ucaldav/user/douglm/</href>
    <propstat>
      <prop>
        <ns3:getctag>20090711T032736Z-4</ns3:getctag>
        <displayname>douglm</displayname>
        <ns1:calendar-description></ns1:calendar-description>
        <resourcetype>
          <collection/>
        </resourcetype>
      </prop>
      <status>HTTP/1.1 200 ok</status>
    </propstat>
    <propstat>
      <prop>
        <ns4:calendar-color/>
        <ns4:calendar-order/>
        <ns1:calendar-free-busy-set/>
      </prop>
      <status>HTTP/1.1 404 not_found</status>
    </propstat>
  </response>
  <response>
    <href>/ucaldav/user/douglm/Inbox/</href>
    <propstat>
      <prop>
        <ns3:getctag>20090305T164935Z-1</ns3:getctag>
        <displayname>Inbox</displayname>
        <ns1:calendar-description></ns1:calendar-description>
        <resourcetype>
          <collection/>
          <ns1:schedule-inbox/>
        </resourcetype>
        <ns1:calendar-free-busy-set>
          <href>/ucaldav/user/douglm/calendar</href>
        </ns1:calendar-free-busy-set>
      </prop>
      <status>HTTP/1.1 200 ok</status>
    </propstat>
    <propstat>
      <prop>
        <ns4:calendar-color/>
        <ns4:calendar-order/>
      </prop>
      <status>HTTP/1.1 404 not_found</status>
    </propstat>
  </response>
  <response>
    <href>/ucaldav/user/douglm/Outbox/</href>
    <propstat>
      <prop>
        <ns3:getctag>20090305T164939Z-1</ns3:getctag>
        <displayname>Outbox</displayname>
        <ns1:calendar-description></ns1:calendar-description>
        <resourcetype>
          <collection/>
          <ns1:schedule-outbox/>
        </resourcetype>
      </prop>
      <status>HTTP/1.1 200 ok</status>
    </propstat>
    <propstat>
      <prop>
        <ns4:calendar-color/>
        <ns4:calendar-order/>
        <ns1:calendar-free-busy-set/>
      </prop>
      <status>HTTP/1.1 404 not_found</status>
    </propstat>
  </response>
  <response>
    <href>/ucaldav/user/douglm/calendar/</href>
    <propstat>
      <prop>
        <ns3:getctag>20090723T173640Z-9</ns3:getctag>
        <displayname>calendar</displayname>
        <ns1:calendar-description></ns1:calendar-description>
        <resourcetype>
          <collection/>
          <ns1:calendar/>
        </resourcetype>
      </prop>
      <status>HTTP/1.1 200 ok</status>
    </propstat>
    <propstat>
      <prop>
        <ns4:calendar-color/>
        <ns4:calendar-order/>
        <ns1:calendar-free-busy-set/>
      </prop>
      <status>HTTP/1.1 404 not_found</status>
    </propstat>
  </response>
</multistatus>
Request:
PROPFIND
Depth 1
Url: /ucaldav/user/douglm/calendar/
Content:
<?xml version="1.0" encoding="utf-8"?>
<x0:propfind xmlns:x0="DAV:">
 <x0:prop>
  <x0:getetag/>
  <x0:resourcetype/>
 </x0:prop>
</x0:propfind>

iCal knows this is a calendar collection and is finding out what the etags are for each contained item. The response shows there are two items.

Response:
<?xml version="1.0" encoding="UTF-8" ?>

<multistatus xmlns="DAV:" xmlns:ns1="urn:ietf:params:xml:ns:caldav" xmlns:ns2="http://www.w3.org/2002/12/cal/ical#">
  <response>
    <href>/ucaldav/user/douglm/calendar/</href>
    <propstat>
      <prop>
        <getetag>"20090723T173640Z-9"</getetag>
        <resourcetype>
          <collection/>
          <ns1:calendar/>
        </resourcetype>
      </prop>
      <status>HTTP/1.1 200 ok</status>
    </propstat>
  </response>
  <response>
    <href>/ucaldav/user/douglm/calendar/CAL-ff808181-2267d9f2-0122-67da02d7-0000000b.ics</href>
    <propstat>
      <prop>
        <getetag>"20090711T032736Z-0"</getetag>
        <resourcetype/>
      </prop>
      <status>HTTP/1.1 200 ok</status>
    </propstat>
  </response>
  <response>
    <href>/ucaldav/user/douglm/calendar/6252D6C40A8308BFE25BBDEAzzz1-0yyyyhhhiiijjjkkklllmn.ics</href>
    <propstat>
      <prop>
        <getetag>"20090721T173919Z-0"</getetag>
        <resourcetype/>
      </prop>
      <status>HTTP/1.1 200 ok</status>
    </propstat>
  </response>
</multistatus>
Request:
REPORT
Uri: /ucaldav/user/douglm/calendar/

Content:
<?xml version="1.0" encoding="UTF-8" ?>
<x0:calendar-multiget xmlns:x0="urn:ietf:params:xml:ns:caldav"
                      xmlns:x1="DAV:">
  <x1:prop>
    <x1:getetag/>
    <x0:calendar-data/>
  </x1:prop>
  <x1:href>/ucaldav/user/douglm/calendar/CAL-ff808181-2267d9f2-0122-67da02d7-0000000b.ics</x1:href>
  <x1:href>/ucaldav/user/douglm/calendar/6252D6C40A8308BFE25BBDEAzzz1-0yyyyhhhiiijjjkkklllmn.ics</x1:href>
</x0:calendar-multiget>

This multiget request retrieves the 2 events

Response: (truncated)
<?xml version="1.0" encoding="UTF-8" ?>

<multistatus xmlns="DAV:" xmlns:ns1="urn:ietf:params:xml:ns:caldav" xmlns:ns2="http://www.w3.org/2002/12/cal/ical#">
  <response>
    <href>/ucaldav/user/douglm/calendar/CAL-ff808181-2267d9f2-0122-67da02d7-0000000b.ics</href>
    <propstat>
      <prop>
        <getetag>"20090711T032736Z-0"</getetag>
        <ns1:calendar-data><![CDATA[BEGIN:VCALENDAR
PRODID:BedeWork V3.5
VERSION:2.0
BEGIN:VTIMEZONE
TZID:America/New_York
...
END:VTIMEZONE
BEGIN:VEVENT
CREATED:20090711T032736Z
DTEND;TZID=America/New_York:20080406T140000
DTSTAMP:20090711T032736Z
DTSTART;TZID=America/New_York:20080406T130000
LAST-MODIFIED:20090711T032736Z
SEQUENCE:0
SUMMARY:Event for overrides
UID:CAL-ff808181-2267d9f2-0122-67da02d7-0000000bdemobedework@mysite.edu
URL:http://masterlink.edu
RRULE:FREQ=DAILY;INTERVAL=1;COUNT=3
END:VEVENT
BEGIN:VEVENT
CREATED:20090711T032736Z
DTEND;TZID=America/New_York:20080406T140000
DTSTAMP:20090711T032736Z
DTSTART;TZID=America/New_York:20080406T130000
LAST-MODIFIED:20090711T032736Z
RECURRENCE-ID:20080406T170000Z
SEQUENCE:0
SUMMARY:Event for overrides
UID:CAL-ff808181-2267d9f2-0122-67da02d7-0000000bdemobedework@mysite.edu
URL:http://instancelink.edu
END:VEVENT
END:VCALENDAR
]]></ns1:calendar-data>
      </prop>
      <status>HTTP/1.1 200 ok</status>
    </propstat>
  </response>
  <response>
    <href>/ucaldav/user/douglm/calendar/6252D6C40A8308BFE25BBDEAzzz1-0yyyyhhhiiijjjkkklllmn.ics</href>
    <propstat>
      <prop>
        <getetag>"20090721T173919Z-0"</getetag>
        <ns1:calendar-data><![CDATA[BEGIN:VCALENDAR
PRODID:BedeWork V3.5
VERSION:2.0
METHOD:REQUEST
BEGIN:VEVENT
ATTENDEE:MAILTO:att1@mysite.edu
ATTENDEE:MAILTO:att2@mysite.edu
CREATED:20090721T173919Z
DTEND:20090721T200000Z
DTSTAMP:20090721T173919Z
DTSTART:20090721T190000Z
LAST-MODIFIED:20090721T173919Z
LOCATION;X-BEDEWORK-UID=ff808181-229e655f-0122-9e655f7a-00000000:Seattle b
 is
ORGANIZER:MAILTO:douglm@mysite.edu
SEQUENCE:0
SUMMARY:OracleCalDAVTest.Meeting 1.1bis yyyyyhhhiiijjjkkklllmn
UID:OracleCalDAVTest.Meeting11-a yyyyyyyhhhiiijjjkkklllmn
END:VEVENT
END:VCALENDAR
]]></ns1:calendar-data>
      </prop>
      <status>HTTP/1.1 200 ok</status>
    </propstat>
  </response>
</multistatus>
Request:
PROPFIND
Depth 1
Uri: /ucaldav/user/douglm/Inbox/

Content:
<?xml version="1.0" encoding="utf-8"?>
<x0:propfind xmlns:x0="DAV:">
 <x0:prop>
  <x0:getetag/>
  <x0:resourcetype/>
 </x0:prop>
</x0:propfind>

Ical is checking the inbox - it's empty

Response:
<?xml version="1.0" encoding="UTF-8" ?>

<multistatus xmlns="DAV:" xmlns:ns1="urn:ietf:params:xml:ns:caldav" xmlns:ns2="http://www.w3.org/2002/12/cal/ical#">
  <response>
    <href>/ucaldav/user/douglm/Inbox/</href>
    <propstat>
      <prop>
        <getetag>"20090305T164935Z-1"</getetag>
        <resourcetype>
          <collection/>
          <ns1:schedule-inbox/>
        </resourcetype>
      </prop>
      <status>HTTP/1.1 200 ok</status>
    </propstat>
  </response>
</multistatus>
Request:
PROPFIND
Depth 1
Uri: /ucaldav/principals/users/douglm/
Content:
<?xml version="1.0" encoding="utf-8"?>
<x0:propfind xmlns:x0="DAV:">
 <x0:prop>
  <x0:resourcetype/>
 </x0:prop>
</x0:propfind>

This may be related to Apple's implemntation of user proxies. The principal is treated as a group containing read and read/write proxies.

Response: (no proxies here)
<?xml version="1.0" encoding="UTF-8" ?>

<multistatus xmlns="DAV:" xmlns:ns1="urn:ietf:params:xml:ns:caldav" xmlns:ns2="http://www.w3.org/2002/12/cal/ical#">
  <response>
    <href>/ucaldav/principals/users/douglm/</href>
    <propstat>
      <prop>
        <resourcetype>
          <principal/>
        </resourcetype>
      </prop>
      <status>HTTP/1.1 200 ok</status>
    </propstat>
  </response>
</multistatus>

Time passes...

Request:
PROPFIND
Depth 1
Uri: /ucaldav/user/douglm/
Content:
<?xml version="1.0" encoding="utf-8"?>
<x0:propfind xmlns:x1="http://calendarserver.org/ns/" xmlns:x0="DAV:" xmlns:x3="http://apple.com/ns/ical/" xmlns:x2="urn:ietf:params:xml:ns:caldav">
 <x0:prop>
  <x1:getctag/>
  <x0:displayname/>
  <x2:calendar-description/>
  <x3:calendar-color/>
  <x3:calendar-order/>
  <x0:resourcetype/>
  <x2:calendar-free-busy-set/>
 </x0:prop>
</x0:propfind>
Response;
As before

Repeated every few minutes.

Bedework supports the apple ctag on a collection. iCal does not need to follow up the above PROPFIND as the ctag is unchanged for all collections.