I’m using sabre-dav 3.0.2 as my Cal/CardDAV server.
I’ve checked with them here:
https://github.com/fruux/sabre-dav/issues/698
And they seem pretty convinced that em Client is not correctly setting the depth header when doing a PrincipalSearchCommand.
In summart I get this in the em Client logs between em Client and the CardDAV server:
06:44:22.355|021| <?xml version="1.0" encoding="utf-8"?><principal-property-search test="anyof" xmlns:d="DAV:"><property-search><prop><displayname></displayname></prop><match match-type="starts-with">mag</match></property-search><property-search><prop><first-name xmlns="http://calendarserver.org/ns/"></first-name></prop><match match-type="starts-with">mag</match></property-search><property-search><prop><last-name xmlns="http://calendarserver.org/ns/"></last-name></prop><match match-type="starts-with">mag</match></property-search><property-search><prop><email-address-set xmlns="http://calendarserver.org/ns/"></email-address-set></prop><match match-type="starts-with">mag</match></property-search><prop><displayname></displayname><calendar-user-type xmlns="urn:ietf:params:xml:ns:caldav"></calendar-user-type><email-address-set xmlns="http://calendarserver.org/ns/"></email-address-set></prop><apply-to-principal-collection-set></apply-to-principal-collection-set></principal-property-search>
06:44:22.585|021| S: REPORT http://192.168.1.124/sabreDAV/syno.php/principals/admin/
06:44:22.585|021| BadRequest Bad Request 06:44:22.585|021| Response, stream length: -1, 258 06:44:22.585|021| Content:<?xml version="1.0" encoding="utf-8"?><error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
<sabredav-version>3.0.2</sabredav-version>
<exception>Sabre\DAV\Exception\BadRequest</exception>
<message><b>Depth must be 0</b></message>
</error>
``` In this example I'd got as far as typing "mag" in before the error window popped up saying:
> [CalDAV / CardDAv] Failed to get list of users and groups. (Bad Request)
The RFC he refers to is:
[http://tools.ietf.org/html/rfc3744#section-9.4](http://tools.ietf.org/html/rfc3744#section-9.4) (corrected as part of edit)
Regards,
Rob