[ietf-caldav] <DAV:href> and invalid URL characters

Gren Elliot gren.elliot at scalix.com
Thu Mar 12 08:44:57 PDT 2009


Hi,

Seeking some thoughts or a pointer to a definitive answer, as I can't 
see an immediate, definitive answer in the WebDAV spec.

We sometimes find that a CalDAV client ends up choosing the final 
element of the path name for a new calendar entry using a PUT similar to :

PUT 
/api/dav/Calendars/Users/Attendee.One at eg.test/Calendar/%7BCA-GREN-49B1-233%7D.ics 
HTTP/1.1

%7B happens to be the way you would encode "{" in a URL and %7D for "}", 
these characters not being valid in a well formed URL.

The same client then later asks for the same entry using :
REPORT /api/dav/Calendars/Users/Attendee.One at eg.test/Calendar/ HTTP/1.1
...

<?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>/api/dav/Calendars/Users/Attendee.One at eg.test/Calendar/{CA-GREN-49B1-233}.ics</x1:href>
</x0:calendar-multiget>

and is not happy when it gets the response :

<D:multistatus xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:D="DAV:">
<D:response>
<D:href>/api/dav/Calendars/Users/Attendee.One at eg.test/Calendar/%7BCA-GREN-49B1-233%7D.ics</D:href>
<D:propstat>
<D:prop>
<D:getetag>8</D:getetag>
<C:calendar-data>BEGIN:VCALENDAR&#13;
CALSCALE:GREGORIAN&#13;
...

So, my question is, what should go in <DAV:href>?  A well formed URL 
with correct encoding or is it OK (or even more correct?) to translate 
to the more visually friendly form?  Theoretically, in this particular 
case, the response could follow whatever was used in the request but...

Regards,
Gren.

-- 
Gren Elliot
Senior Software Engineer
*Scalix*
gren.elliot at scalix.com
Tel: +44 1344 381812
www.scalix.com


More information about the ietf-caldav mailing list