OK, *WRONG* request:
MKCALENDAR /calendars/<my-account>/querty/ HTTP/1.1
Authorization: Basic <sorry-classified>
User-Agent: PHP cURL Client
Host: dav.fruux.com
Accept: */*
Depth: 0
Content-type: application/xml
Content-Length: 1083
Expect: 100-continue
<?xml version='1.0' encoding='UTF-8' ?>
<C:mkcalendar xmlns:D='DAV:' xmlns:C='urn:ietf:params:xml:ns:caldav'>
<D:set>
<D:prop>
<D:displayname>New Calendar</D:displayname>
<C:calendar-timezone><![CDATA[BEGIN:VCALENDAR
BEGIN:VTIMEZONE
TZID:Australia-Sydney
BEGIN:STANDARD
TZNAME:Australia-Sydney Standard Time
DTSTART:19700101T020000
TZOFFSETFROM:+1000
TZOFFSETTO:+1100
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
BEGIN:DAYLIGHT
TZNAME:Australia-Sydney Daylight Savings Time
DTSTART:19700102T020000
TZOFFSETFROM:+1100
TZOFFSETTO:+1000
RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=-1SU
END:DAYLIGHT
END:VTIMEZONE
END:VCALENDAR
]]></C:calendar-timezone>
<C:supported-calendar-data>text/calendar</C:supported-calendar-data>
<C:min-date-time>19900815T205030Z</C:min-date-time>
<C:max-date-time>20100815T205030Z</C:max-date-time>
<C:supported-calendar-component-set>
<C:comp name="VEVENT"/>
</C:supported-calendar-component-set>
</D:prop>
</D:set>
</C:mkcalendar>
HTTP-Response:
HTTP/1.1 100 Continue
HTTP/1.1 401 Unauthorized
Content-Type: application/xml; charset=utf-8
Date: Sat, 17 Jan 2015 19:58:40 GMT
Server: nginx
WWW-Authenticate: Basic realm="Fruux"
X-Responding-Server: production-3
Content-Length: 298
Connection: keep-alive
HTTP/1.1 100 Continue
HTTP/1.1 500 Internal Server Error
Content-Type: application/xml; charset=utf-8
Date: Sat, 17 Jan 2015 19:58:41 GMT
Server: nginx
X-Responding-Server: production-1
X-Sabre-Version: 2.2.0-alpha1
Content-Length: 270
Connection: keep-alive
<?xml version='1.0' encoding='utf-8' ?>
<d:error xmlns:d='DAV:' xmlns:s='http://sabredav.org/ns'>
<s:sabredav-version>2.2.0-alpha1</s:sabredav-version>
<s:exception>ErrorException</s:exception>
<s:message>Trying to get property of non-object</s:message>
</d:error>
Functional MKCOL code :
MKCOL /calendars/<my-account>/querty/ HTTP/1.1
Authorization: Basic <sorry-still-classified>
User-Agent: PHP cURL Client
Host: dav.fruux.com
Accept: */*
Content-type: application/xml
Content-Length: 1149
Expect: 100-continue
<?xml version='1.0' encoding='UTF-8' ?>
<D:mkcol xmlns:D='DAV:' xmlns:C='urn:ietf:params:xml:ns:caldav'>
<D:set>
<D:prop>
<D:displayname>New Calendar</D:displayname>
<C:calendar-timezone>BEGIN:VCALENDAR
BEGIN:VTIMEZONE
TZID:Europe-Brussels
BEGIN:STANDARD
TZNAME:Europe-Brussels Standard Time
DTSTART:19700101T020000
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
BEGIN:DAYLIGHT
TZNAME:Europe-Brussels Daylight Savings Time
DTSTART:19700102T020000
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=-1SU
END:DAYLIGHT
END:VTIMEZONE
END:VCALENDAR
</C:calendar-timezone>
<C:supported-calendar-data>text/calendar</C:supported-calendar-data>
<C:min-date-time>19900815T205030Z</C:min-date-time>
<C:max-date-time>20100815T205030Z</C:max-date-time>
<D:resourcetype>
<D:collection/>
<C:calendar/>
</D:resourcetype>
<C:supported-calendar-component-set>
<C:comp name="VEVENT"/>
</C:supported-calendar-component-set>
</D:prop>
</D:set>
</D:mkcol>
HTTP-Response:
HTTP/1.1 100 Continue
HTTP/1.1 401 Unauthorized
Content-Type: application/xml; charset=utf-8
Date: Sat, 17 Jan 2015 20:12:21 GMT
Server: nginx
WWW-Authenticate: Basic realm="Fruux"
X-Responding-Server: production-3
Content-Length: 298
Connection: keep-alive
HTTP/1.1 100 Continue
HTTP/1.1 201 Created
Content-Type: text/html
Date: Sat, 17 Jan 2015 20:12:21 GMT
Server: nginx
Strict-Transport-Security: max-age=31536000
X-Responding-Server: production-3
X-Sabre-Version: 2.2.0-alpha1
Content-Length: 0
Connection: keep-alive
Functional MKCALENDAR code :
MKCALENDAR /calendars/<my-account>/querty/ HTTP/1.1
Authorization: Basic <gotcha-still-classified>
User-Agent: PHP cURL Client
Host: dav.fruux.com
Accept: */*
Content-type: application/xml
Content-Length: 1159
Expect: 100-continue
<?xml version='1.0' encoding='UTF-8' ?>
<C:mkcalendar xmlns:D='DAV:' xmlns:C='urn:ietf:params:xml:ns:caldav'>
<D:set>
<D:prop>
<D:displayname>New Calendar</D:displayname>
<C:calendar-timezone>BEGIN:VCALENDAR
BEGIN:VTIMEZONE
TZID:Europe-Brussels
BEGIN:STANDARD
TZNAME:Europe-Brussels Standard Time
DTSTART:19700101T020000
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
BEGIN:DAYLIGHT
TZNAME:Europe-Brussels Daylight Savings Time
DTSTART:19700102T020000
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=-1SU
END:DAYLIGHT
END:VTIMEZONE
END:VCALENDAR
</C:calendar-timezone>
<C:supported-calendar-data>text/calendar</C:supported-calendar-data>
<C:min-date-time>19900815T205030Z</C:min-date-time>
<C:max-date-time>20100815T205030Z</C:max-date-time>
<D:resourcetype>
<D:collection/>
<C:calendar/>
</D:resourcetype>
<C:supported-calendar-component-set>
<C:comp name="VEVENT"/>
</C:supported-calendar-component-set>
</D:prop>
</D:set>
</C:mkcalendar>
HTTP-Response:
HTTP/1.1 100 Continue
HTTP/1.1 401 Unauthorized
Content-Type: application/xml; charset=utf-8
Date: Sat, 17 Jan 2015 20:18:14 GMT
Server: nginx
WWW-Authenticate: Basic realm="Fruux"
X-Responding-Server: production-3
Content-Length: 298
Connection: keep-alive
HTTP/1.1 100 Continue
HTTP/1.1 201 Created
Content-Type: text/html
Date: Sat, 17 Jan 2015 20:18:15 GMT
Server: nginx
Strict-Transport-Security: max-age=31536000
X-Responding-Server: production-1
X-Sabre-Version: 2.2.0-alpha1
Content-Length: 0
Connection: keep-alive
Not obvious to spot - but in the first (failing) request, there were some trailing whitespaces in the VTIMEZONE snippet (careless coding ...).
Once I removed these, both MKCOL and MKCALENDAR work.
Regards,
Bert