[CalendarServer-users] calendar-query bug(s)?

Mark Cockfield mark.cockfield at gmail.com
Sun Nov 23 22:55:03 PST 2008


If I do a calendar-query requesting all To Dos, and Events within a
timeframe, both To Dos, one with due date and one without, are returned
fine. When I request an expansion of recurring components it appears that
for the To Do without a due date a calendar object is returned without the
child To Do component.

REPORT /calendars/__uids__/d31e3aa2-4555-5415-bb0d-47c5c7ae9f16/ HTTP/1.1
Accept-Encoding: identity
Content-Length: 465
depth: 1
content-type: application/xml
authorization: Basic Ym9iOnNtaXRo
user-agent: Test Application
Host: localhost:8008

<?xml version="1.0" encoding="utf-8" ?>
<C:calendar-query xmlns:C="urn:ietf:params:xml:ns:caldav"
xmlns:D="DAV:">
<D:prop>
<C:calendar-data>
<C:comp name="VCALENDAR">
<C:allprop/>
<C:allcomp/>
</C:comp>
</C:calendar-data>
</D:prop>
<C:filter>
<C:comp-filter name="VCALENDAR">
<C:comp-filter name="VEVENT">
<C:time-range start="20081101T000000Z" end="20081201T000000Z"/>
</C:comp-filter>
<C:comp-filter name="VTODO"/>
</C:comp-filter>
</C:filter>
</C:calendar-query>

HTTP/1.1 207 Multi-Status
Content-Length: 3997
Accept-Ranges: bytes
Server: Twisted/2.5.0+rUnknown TwistedWeb/[twisted.web2, version 0.2.0 (SVN
rUnknown)] TwistedCalDAV/?
Last-Modified: Mon, 24 Nov 2008 03:19:57 GMT
DAV: 1, access-control, calendar-access, calendar-schedule,
calendar-auto-schedule, calendar-availability, inbox-availability,
calendar-proxy, calendarserver-private-events,
calendarserver-private-comments, calendarserver-principal-property-search
ETag: "66BB75-88-492A1D5D"
Date: Mon, 24 Nov 2008 06:02:00 GMT
Content-Type: text/xml

<?xml version='1.0' encoding='UTF-8'?>
<multistatus xmlns='DAV:'>
  <response>
    
<href>/calendars/__uids__/d31e3aa2-4555-5415-bb0d-47c5c7ae9f16/calendar/1763
87DF-778E-4D44-9D2E-764FB9294FCF.ics</href>
    <propstat>
      <prop>
        <calendar-data
xmlns='urn:ietf:params:xml:ns:caldav'><![CDATA[BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//Apple Inc.//iCal 3.0//EN
BEGIN:VTODO
CREATED:20081124T032512Z
DTSTAMP:20081124T032543Z
PRIORITY:0
SEQUENCE:2
SUMMARY:To Do w/o due date
UID:176387DF-778E-4D44-9D2E-764FB9294FCF
X-APPLE-SORT-ORDER:2147483647
END:VTODO
END:VCALENDAR
]]></calendar-data>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
  <response>
    
<href>/calendars/__uids__/d31e3aa2-4555-5415-bb0d-47c5c7ae9f16/calendar/3921
7D71-3EA9-4F0D-ACA8-1B1C22E6F508.ics</href>
    <propstat>
      <prop>
        <calendar-data
xmlns='urn:ietf:params:xml:ns:caldav'><![CDATA[BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//Apple Inc.//iCal 3.0//EN
BEGIN:VTIMEZONE
TZID:America/Detroit
BEGIN:STANDARD
DTSTART:20071104T020000
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
TZNAME:EST
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20070311T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
TZNAME:EDT
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
UID:39217D71-3EA9-4F0D-ACA8-1B1C22E6F508
DTSTART;TZID=America/Detroit:20081126T150000
DTEND;TZID=America/Detroit:20081126T160000
CREATED:20081124T032426Z
DTSTAMP:20081124T032459Z
RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=WE,FR;WKST=SU
SEQUENCE:4
SUMMARY:Recurring Event
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR
]]></calendar-data>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
  <response>
    
<href>/calendars/__uids__/d31e3aa2-4555-5415-bb0d-47c5c7ae9f16/calendar/4BF4
05C9-BC1A-4531-AE10-EB97BAC470D0.ics</href>
    <propstat>
      <prop>
        <calendar-data
xmlns='urn:ietf:params:xml:ns:caldav'><![CDATA[BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//Apple Inc.//iCal 3.0//EN
BEGIN:VTIMEZONE
TZID:America/Detroit
BEGIN:STANDARD
DTSTART:19671029T020000
RRULE:FREQ=YEARLY;UNTIL=20061029T060000Z;BYMONTH=10;BYDAY=-1SU
TZNAME:EST
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:19870405T020000
RRULE:FREQ=YEARLY;UNTIL=20060402T070000Z;BYMONTH=4;BYDAY=1SU
TZNAME:EDT
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VTODO
CREATED:20081124T032550Z
DTSTAMP:20081124T032645Z
DTSTART;TZID=America/Detroit:20040101T120000
DUE;VALUE=DATE:20081130
PRIORITY:0
SEQUENCE:4
SUMMARY:To Do with due date
UID:4BF405C9-BC1A-4531-AE10-EB97BAC470D0
X-APPLE-SORT-ORDER:2147483647
END:VTODO
END:VCALENDAR
]]></calendar-data>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
  <response>
    
<href>/calendars/__uids__/d31e3aa2-4555-5415-bb0d-47c5c7ae9f16/calendar/96F8
7A28-DCD4-4609-A56C-89F815E06B95.ics</href>
    <propstat>
      <prop>
        <calendar-data
xmlns='urn:ietf:params:xml:ns:caldav'><![CDATA[BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//Apple Inc.//iCal 3.0//EN
BEGIN:VTIMEZONE
TZID:America/Detroit
BEGIN:STANDARD
DTSTART:20071104T020000
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
TZNAME:EST
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20070311T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
TZNAME:EDT
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
UID:96F87A28-DCD4-4609-A56C-89F815E06B95
DTSTART;TZID=America/Detroit:20081124T130000
DTEND;TZID=America/Detroit:20081124T140000
CREATED:20081124T032326Z
DTSTAMP:20081124T032408Z
SEQUENCE:3
SUMMARY:Single Event
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR
]]></calendar-data>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
</multistatus>

***********************************

REPORT /calendars/__uids__/d31e3aa2-4555-5415-bb0d-47c5c7ae9f16/ HTTP/1.1
Accept-Encoding: identity
Content-Length: 525
depth: 1
content-type: application/xml
authorization: Basic Ym9iOnNtaXRo
user-agent: Test Application
Host: localhost:8008

<?xml version="1.0" encoding="utf-8" ?>
<C:calendar-query xmlns:C="urn:ietf:params:xml:ns:caldav"
xmlns:D="DAV:">
<D:prop>
<C:calendar-data>
<C:comp name="VCALENDAR">
<C:allprop/>
<C:allcomp/>
</C:comp>
<C:expand start="20081101T000000Z" end="20081201T000000Z"/>
</C:calendar-data>
</D:prop>
<C:filter>
<C:comp-filter name="VCALENDAR">
<C:comp-filter name="VEVENT">
<C:time-range start="20081101T000000Z" end="20081201T000000Z"/>
</C:comp-filter>
<C:comp-filter name="VTODO"/>
</C:comp-filter>
</C:filter>
</C:calendar-query>

HTTP/1.1 207 Multi-Status
Content-Length: 2971
Accept-Ranges: bytes
Server: Twisted/2.5.0+rUnknown TwistedWeb/[twisted.web2, version 0.2.0 (SVN
rUnknown)] TwistedCalDAV/?
Last-Modified: Mon, 24 Nov 2008 03:19:57 GMT
DAV: 1, access-control, calendar-access, calendar-schedule,
calendar-auto-schedule, calendar-availability, inbox-availability,
calendar-proxy, calendarserver-private-events,
calendarserver-private-comments, calendarserver-principal-property-search
ETag: "66BB75-88-492A1D5D"
Date: Mon, 24 Nov 2008 06:03:14 GMT
Content-Type: text/xml

<?xml version='1.0' encoding='UTF-8'?>
<multistatus xmlns='DAV:'>
  <response>
    
<href>/calendars/__uids__/d31e3aa2-4555-5415-bb0d-47c5c7ae9f16/calendar/1763
87DF-778E-4D44-9D2E-764FB9294FCF.ics</href>
    <propstat>
      <prop>
        <calendar-data
xmlns='urn:ietf:params:xml:ns:caldav'><![CDATA[BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//Apple Inc.//iCal 3.0//EN
END:VCALENDAR
]]></calendar-data>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
  <response>
    
<href>/calendars/__uids__/d31e3aa2-4555-5415-bb0d-47c5c7ae9f16/calendar/3921
7D71-3EA9-4F0D-ACA8-1B1C22E6F508.ics</href>
    <propstat>
      <prop>
        <calendar-data
xmlns='urn:ietf:params:xml:ns:caldav'><![CDATA[BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//Apple Inc.//iCal 3.0//EN
BEGIN:VEVENT
UID:39217D71-3EA9-4F0D-ACA8-1B1C22E6F508
DTSTART;TZID=America/Detroit:20081126T200000Z
DTEND;TZID=America/Detroit:20081126T210000Z
CREATED:20081124T032426Z
DTSTAMP:20081124T032459Z
SEQUENCE:4
SUMMARY:Recurring Event
TRANSP:OPAQUE
END:VEVENT
BEGIN:VEVENT
UID:39217D71-3EA9-4F0D-ACA8-1B1C22E6F508
RECURRENCE-ID:20081128T200000Z
DTSTART;TZID=America/Detroit:20081128T200000Z
DTEND;TZID=America/Detroit:20081128T210000Z
CREATED:20081124T032426Z
DTSTAMP:20081124T032459Z
SEQUENCE:4
SUMMARY:Recurring Event
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR
]]></calendar-data>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
  <response>
    
<href>/calendars/__uids__/d31e3aa2-4555-5415-bb0d-47c5c7ae9f16/calendar/4BF4
05C9-BC1A-4531-AE10-EB97BAC470D0.ics</href>
    <propstat>
      <prop>
        <calendar-data
xmlns='urn:ietf:params:xml:ns:caldav'><![CDATA[BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//Apple Inc.//iCal 3.0//EN
BEGIN:VTODO
CREATED:20081124T032550Z
DTSTAMP:20081124T032645Z
DTSTART;TZID=America/Detroit:20040101T170000Z
DUE;VALUE=DATE:20081130
PRIORITY:0
SEQUENCE:4
SUMMARY:To Do with due date
UID:4BF405C9-BC1A-4531-AE10-EB97BAC470D0
X-APPLE-SORT-ORDER:2147483647
END:VTODO
END:VCALENDAR
]]></calendar-data>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
  <response>
    
<href>/calendars/__uids__/d31e3aa2-4555-5415-bb0d-47c5c7ae9f16/calendar/96F8
7A28-DCD4-4609-A56C-89F815E06B95.ics</href>
    <propstat>
      <prop>
        <calendar-data
xmlns='urn:ietf:params:xml:ns:caldav'><![CDATA[BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//Apple Inc.//iCal 3.0//EN
BEGIN:VEVENT
UID:96F87A28-DCD4-4609-A56C-89F815E06B95
DTSTART;TZID=America/Detroit:20081124T180000Z
DTEND;TZID=America/Detroit:20081124T190000Z
CREATED:20081124T032326Z
DTSTAMP:20081124T032408Z
SEQUENCE:3
SUMMARY:Single Event
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR
]]></calendar-data>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
</multistatus>

Also, according to rfc4791:

> ³If the CALDAV:calendar-data XML element doesn¹t contain any CALDAV:comp
> element, calendar object resources will be returned in their entirety.²
> 
This appears to be only the case when the calendar-data element is empty.
When the expand element is added, the server returns an Internal Server
Error and the log shows:

2008-11-24 00:25:41-0500 [-] [caldav-8008]     exceptions.ValueError:
CalDAV:calendar-data {urn:ietf:params:xml:ns:caldav}calendar-data has no
CalDAV:comp child

Am I misinterpreting the RFC (yet again)?

Regards,

Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-users/attachments/20081124/4ffe82c1/attachment.html>


More information about the calendarserver-users mailing list