emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: url-dav and Radicale


From: Eric Abrahamsen
Subject: Re: url-dav and Radicale
Date: Sun, 01 May 2016 18:34:52 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Yuri Khan <address@hidden> writes:

> On Sun, May 1, 2016 at 3:10 PM, Eric Abrahamsen <address@hidden> wrote:
>
>> In a nutshell, Emacs' url-dav.el library, when parsing responses from a
>> DAV server, assumes XML node names that are all prefixed with "DAV:".
>> Ie, "DAV:multistatus".
>
> As far as I can see, url-dav-process-response calls xml-parse-region
> with the last argument set to 'symbol-qnames, which does the right
> thing for non-default XML namespace prefixes whose URI is "DAV:".
> Here:
>
> <foo:multistatus xmlns:foo="DAV:">
> </foo:multistatus>
>
> M-: (xml-parse-region nil nil nil nil 'symbol-qnames)
>
> ⇒ ((DAV:multistatus ((... . "DAV:")) "
> "))
>
> However it does not handle the default namespace for me:
>
> <multistatus xmlns="DAV:">
> </multistatus>
>
> M-: (xml-parse-region nil nil nil nil 'symbol-qnames)
>
> ⇒ ((multistatus ((http://www\.w3\.org/2000/xmlns/xmlns . "DAV:")) "
> "))
>
> That’s a bug in xml.el.

Glad to hear from someone who understands XML!

>> Radicale, on the other hand, just sends back "multistatus"
>
> Does it also send an xmlns="DAV:" on that element?

Yes it does. Here's a full multistatus response from Radicale, with the
multis elided.

HTTP/1.1 207 Unknown
Date: Sun, 01 May 2016 10:28:45 GMT
Server: Apache/2.4.7 (Ubuntu)
DAV: 1, 2, 3, calendar-access, addressbook, extended-mkcol
Content-Length: 5804
Keep-Alive: timeout=5, max=98
Connection: Keep-Alive
Content-Type: text/xml
<?xml version="1.0"?><multistatus xmlns="DAV:" 
xmlns:C="urn:ietf:params:xml:ns:caldav">
<response>
<href>/eric/eric/</href>
<propstat>
<prop>
<resourcetype>
<C:calendar />
<collection />
</resourcetype>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
<response>
<href>/eric/eric/64d13baa-561e-4255-8fd8-78f3424ea1d8.ics</href>
<propstat>
<prop>
<resourcetype />
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
... More of same
</multistatus>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]