Hello Bill, content-type must be in small letters, in your citation it is Content-Type. Compare to https://datatracker.ietf.org/doc/html/rfc6352#section-8.7.2 .
Greetings // Дилян -----Original Message----- From: Bill Sommerfeld via Info <[email protected]> Reply-To: Info <[email protected]> To: [email protected] Subject: carddav unexpectedly downgrades vcard 4 to vcard 3 Date: 15/05/26 00:47:25 I've recently set up carddav service in my Cyrus installation (running my build of 3.12.2) and attempted to use it to store vcard 4.0 contacts using the Thunderbird Cardbook extension. I can add cyrus as a carddav store, and store vcard 4.0 information into it - the files in the mailstore are all in vcard 4 format - but when I set up a second Thunderbird Cardbook client, all the cards are fetched as vcard 3 format. I dug into it a bit - adding debug syslogs to callers of vcard_to_v3() - and I think I know why. The conversion is happening in propfind_addrdata() in imap/http_carddav.c Cardbook fetches the cards with a REPORT request with a bit of xml (I've formatted it with xmllint -format): <?xml version="1.0" encoding="utf-8"?> <C:addressbook-multiget xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:carddav"> <D:prop> <D:getetag/> <C:address-data Content-Type="text/vcard" version="4.0"/> </D:prop> <D:href>/dav/addressbooks/shared/b26c6ba9-297a-4154-81fb-e8861901be2f.vcf</D:href> <D:href>/dav/addressbooks/shared/4eadf833-0517-4909-b5ff-0b3e32b8ddb0.vcf</D:href> <D:href>/dav/addressbooks/shared/e6e0275d-3338-4198-9616-0b3978003550.vcf</D:href> <D:href>/dav/addressbooks/shared/4426323c-f3cc-4cde-a6fe-05230fca8b0c.vcf</D:href> <D:href>/dav/addressbooks/shared/f37c7416-f065-44ce-89d9-4b44412a5d86.vcf</D:href> </C:addressbook-multiget> Note the C:address-data element with Content-type="text/vcard" and version="4.0" indicating that it wants vcard 4. Looking at propfind_addrdata(), it only ever uses the default carddav struct mime_type_t (which is vcard 3); nothing looks at the request and steps through the alternate mime_type_t's to find one which matches what the client is asking for. I have a somewhat kludgy patch for this against 3.12 but I also see there's been a bit of recent work on http_carddav.c in 3.13; I'd appreciate suggestions on the best way to get this fixed for real.. - Bill ------------------------------------------ Cyrus: Info Permalink: https://cyrus.topicbox.com/groups/info/T40ea562d07888bd7-Mb588c0a6f933fe1879b01625 Delivery options: https://cyrus.topicbox.com/groups/info/subscription
