500 Internal Server Error with icloud

130 views
Skip to first unread message

Ahmad AlTwaijiry

unread,
Jul 30, 2014, 11:09:52 PM7/30/14
to sabredav...@googlegroups.com
Hello everyone

Im trying to get all events from icloud but it seems I'm doing it in a wrong way! 

My request:
REPORT /__ID__/calendars/963311E1-D1CB-4C1D-9AF8-9543F2D5EF3E/ HTTP/1.1
Authorization: Basic wNSQwwNSQwwNSQwwNSQwwNSQwwNSQwwNSQwwN==
Accept: */*
Depth: 1
Content-Type: application/xml
User-Agent: DAV/1.1.1
Content-Length: 128

<c:calendar-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:caldav"><d:prop><c:calendar-data /></d:prop></c:calendar-query>

The response is always:

HTTP/1.1 500 Internal Server Error
Content-Length: 36
Server: iCloudCalendarServer 14E35
X-Transaction-Id: 4cc06fb2-185f-11e4-9d85-984be16f49d8
Date: Thu, 31 Jul 2014 03:03:51 GMT
X-Responding-Server: st11p01me-caldav015 21 a63660a6f7d1a25b5a7ed66dab0da843
Content-Type: text/plain

4cd3ada2-185f-11e4-8ae5-78e3b51be2e4



I'm not able to understand what is missing ?

Evert Pot

unread,
Jul 31, 2014, 4:27:22 PM7/31/14
to sabredav...@googlegroups.com
Hi Admad,

iCloud does not run sabredav, but judging from your request.. you're at least missing the 'filter' element. This element is required for calendar-query.

See:
http://tools.ietf.org/html/rfc4791#section-9.5

for a reference.

Evert

Ahmad AlTwaijiry

unread,
Jul 31, 2014, 6:47:10 PM7/31/14
to sabredav...@googlegroups.com
Hi Evert

I know icloud not using sabredav, I'm just using sabredav as a library for my client.


Downloading objects
Now we download every single object in this calendar. To do this, we use a REPORT method.

REPORT /calendars/johndoe/home/ HTTP/1.1
Depth: 1
Prefer: return-minimal
Content-Type: application/xml; charset=utf-8

<c:calendar-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:caldav">
   <d:prop>
       <d:getetag />
       <c:calendar-data />
   </d:prop>
   <c:filter>
       <c:comp-filter name="VCALENDAR" />
   </c:filter>
</c:calendar-query>


But as I said it's not working, only if I use the below xml with icloud it will work:

Method: PROPFIND
<d:propfind xmlns:d="DAV:"><d:prop><d:getetag/></d:prop></d:propfind>

Not sure if this is special case with icloud or I misunderstood the document.

Evert Pot

unread,
Jul 31, 2014, 6:50:31 PM7/31/14
to sabredav...@googlegroups.com
 It does sound familiar that iCloud does not support every type or request.
Remember that apple does not advertise to support CalDAV. They use CalDAV technology, but it's not at all an open server and they can shut you down when they feel like it.

However, your original request did not have the filter element, so that comment still applies. If adding the filter element does not fix it, then it's possible that iCloud simply does not support that operation.

Ahmad AlTwaijiry

unread,
Jul 31, 2014, 7:32:04 PM7/31/14
to sabredav...@googlegroups.com
Hi

even with filter it will return 500 internal error.

as you said, it seems they are not supporting all requests.


Thanks 
Reply all
Reply to author
Forward
0 new messages