Failed CardDAV/CalDAV updates (UID doesn't match object URI)
Open, 40Public


It was already reported in a couple of places and different client software:

According to DavDroid devs it is not required by standards. So, we should investigate that.

Current code in Kolab/CardDAV/ContactsBackend.php (and CalendarBackend.php) is:

// sanity check
if ($object['uid'] != $uid) {
        'code' => 600, 'type' => 'php',
        'file' => __FILE__, 'line' => __LINE__,
        'message' => "Error creating contact object: UID doesn't match object URI"),
        true, false);

    throw new DAV\Exception\NotFound("UID doesn't match object URI");

we should test what happens if we just replace this code block with:

$uid = $object['uid'];

Maybe we'd need to check if uid is not empty and store the original URI in some custom X-property or sth.


Ticket Type

Event Timeline

We might need to store the original URL-ID of the contact object to be able to handle DELETE requests.

Another option might be a redirect URI on contact creation request (i.e. we return 201 with Location header pointing to the proper-UID-based URI). That would need to be tested if it works with various carddav clients.