Radicale 2.1.10 - VCard4 problem



  • When I edit an contact on Android it is saved as a VCard3 even if it was retrieved as VCard4.
    "davdroid: [syncadapter.ContactsSyncManager] Server advertises VCard/4 support: false"

    EDIT: Using other clients (like Thunderbird+Cardbook Addon) I can create VCard4 contacts on the Radicale server.

    Resulting in the following behavior: Using TB Cardbook to generate Contact results in a VCard4, then editing it with Davdroid results in a new VCard3.

    Is this a bug of DAVdroid or Radicale? Can I circumvent it somehow?

    I already posted that in the Radicale Bugtracker some time ago: https://github.com/Kozea/Radicale/issues/832


  • developer

    Hello,

    Is there any indication that this could be a DAVdroid problem? If you enable verbose logs, you can see the exact request DAVdroid sends for capability detection and how Radicale replies.

    The source code for VCard 4 detection can be found here: https://gitlab.com/bitfireAT/davdroid/blob/2c5cdf813aa5c6e7a6e9cdb01b6213eae2903cb0/app/src/main/java/at/bitfire/davdroid/syncadapter/ContactsSyncManager.kt#L133



  • Not sure though how "hasVCard4" works or what it checks...
    I also could not find a reference logcat (to check against Radicales response)

    But here is the relevant verbose logcat output:

    [syncadapter.SyncManager] Preparing synchronization
    [syncadapter.SyncManager] Querying server capabilities
    [syncadapter.ContactsSyncManager] Contact group method: CATEGORIES
    
    [HttpClient] --> PROPFIND https://dav.example.net/mail%40example.net/COLLECTION-ID/
    [HttpClient] Content-Type: application/xml; charset=utf-8
    [HttpClient] Content-Length: 296
    [HttpClient] Depth: 0
    [HttpClient] 
    [HttpClient] <?xml version='1.0' encoding='UTF-8' ?><propfind xmlns="DAV:" xmlns:CAL="urn:ietf:params:xml:ns:caldav" xmlns:CARD="urn:ietf:params:xml:ns:carddav"><prop><CARD:supported-address-data /><supported-report-set /><n0:getctag xmlns:n0="http://calendarserver.org/ns/" /><sync-token /></prop></propfind>
    [HttpClient] --> END PROPFIND (296-byte body)
    
    [HttpClient] <-- 207 Unknown https://dav.example.net/mail%40example.net/COLLECTION-ID/ (465ms)
    [HttpClient] Date: Wed, 10 Oct 2018 09:44:01 GMT
    [HttpClient] Server: Apache
    [HttpClient] DAV: 1, 2, 3, calendar-access, addressbook, extended-mkcol
    [HttpClient] Keep-Alive: timeout=5, max=100
    [HttpClient] Connection: Keep-Alive
    [HttpClient] Content-Type: text/xml; charset=utf-8
    [HttpClient] 
    [HttpClient] <?xml version='1.0' encoding='utf-8'?>
    <multistatus xmlns="DAV:" xmlns:CR="urn:ietf:params:xml:ns:carddav" xmlns:CS="http://calendarserver.org/ns/"><response><href>/mail%40example.net/COLLECTION-ID/</href><propstat><prop><supported-report-set><supported-report><report><expand-property /></report></supported-report><supported-report><report><principal-search-property-set /></report></supported-report><supported-report><report><principal-property-search /></report></supported-report><supported-report><report><sync-collection /></report></supported-report><supported-report><report><CR:addressbook-multiget /></report></supported-report><supported-report><report><CR:addressbook-query /></report></supported-report></supported-report-set><CS:getctag>"56fc12a79e549c5d6a97381653c7c0be"</CS:getctag><sync-token>http://radicale.org/ns/sync/REDACTED-TOKEN</sync-token></prop><status>HTTP/1.1 200 OK</status></propstat><propstat><prop><CR:supported-address-data /></prop><status>HTTP/1.1 404 Not Found</status></propstat></response></multistatus>
    [HttpClient] <-- END HTTP (1086-byte body)
    
    [syncadapter.ContactsSyncManager] Server supports vCard/4: false
    [syncadapter.ContactsSyncManager] Server supports Collection Sync: true
    

  • developer

    @n00b42 said in Radicale 2.1.10 - VCard4 problem:

    Not sure though how "hasVCard4" works or what it checks...

    It checks CARDDAV:supported-address-data for text/vcard with version=4.0. See https://tools.ietf.org/html/rfc6352#section-6.2.2, including the example.

    The pretty-printed server reply:

    <?xml version="1.0" encoding="utf-8"?>
    <multistatus xmlns="DAV:" xmlns:CR="urn:ietf:params:xml:ns:carddav" xmlns:CS="http://calendarserver.org/ns/">
      <response>
        <href>/mail%40example.net/COLLECTION-ID/</href>
        …
        <propstat>
          <prop>
            <CR:supported-address-data/>
          </prop>
          <status>HTTP/1.1 404 Not Found</status>
        </propstat>
      </response>
    </multistatus>
    

    RFC 6352:

    In the absence of this property, the server MUST only accept data with the media type "text/vcard" and vCard version 3.0, and clients can assume that is all the server will accept.



  • Thank you, I added the relevant information to my Radicale bug report.