CardDAV synchronization with DAVx⁵ fails because contact href URLs end with a trailing slash
Problem reported by Schroeder Robert - Today at 3:44 AM
Submitted

Hello,

Smartermail version 9770 and 9756
I am experiencing a CardDAV synchronization issue between SmarterMail and DAVx⁵ on Android.
Calendar synchronization via CalDAV works correctly, but contact synchronization via CardDAV fails.
After enabling WebDAV logging in SmarterMail and comparing the server response with the DAVx⁵ debug log, I found that SmarterMail returns contact resource URLs with a trailing slash after the .vcf filename.
For example, SmarterMail returns the following in the WebDAV 207 Multi-Status response:
<d:response>
    <d:href>/webdav/addressbooks/Schroeder.mobi/robert/5e259c962ae14781ae8ee1069c97e1a2/74d1acdcee9f48e7a3bbc5459026f70e.vcf/</d:href>
    <d:propstat>
        <d:status>HTTP/1.1 200 OK</d:status>
        <d:prop>
            <d:resourcetype />
            <d:getetag>17782640934913</d:getetag>
        </d:prop>
    </d:propstat>
</d:response>
The important part is:
74d1acdcee9f48e7a3bbc5459026f70e.vcf/
There is a trailing / after .vcf.
This occurs for all contact resources returned by SmarterMail, for example:
74d1acdcee9f48e7a3bbc5459026f70e.vcf/
3f83f090d95546f6b453d760a093212b.vcf/
6530353b612145c4bbd08dc27078a7ea.vcf/
bee0cbc5c78f44c9b2bbc39935777856.vcf/
At the same time, SmarterMail correctly returns an empty <d:resourcetype /> for these resources, indicating that they are not collections.
DAVx⁵ 4.5.20 then aborts the contact synchronization with the following exception:
java.lang.IllegalArgumentException:
Not a member URL (path is empty or ends with a slash)
The address book collection itself correctly ends with /, which is expected:
/webdav/addressbooks/Schroeder.mobi/robert/5e259c962ae14781ae8ee1069c97e1a2/
However, individual .vcf resources appear to be returned as if their URLs were collections because of the trailing slash.
Could you please confirm whether this is a known CardDAV issue in SmarterMail and whether a fix or workaround is available?
I can provide the complete SmarterMail WebDAV log and the DAVx⁵ debug log if required.
Thank you.

Reply to Thread

Enter the verification text