diff --git a/apps/dav/lib/CardDAV/SyncService.php b/apps/dav/lib/CardDAV/SyncService.php index a694172bc49a8..05a08d08286ba 100644 --- a/apps/dav/lib/CardDAV/SyncService.php +++ b/apps/dav/lib/CardDAV/SyncService.php @@ -112,6 +112,8 @@ private function prepareUri(string $host, string $path): string { /* * The trailing slash is important for merging the uris together. * + * $host is stored in oc_trusted_servers.url and usually without a trailing slash. + * * Example for a report request * * $host = 'https://server.internal/cloud' @@ -119,6 +121,14 @@ private function prepareUri(string $host, string $path): string { * * Without the trailing slash, the webroot is missing: * https://server.internal/remote.php/dav/addressbooks/system/system/system + * + * Example for a download request + * + * $host = 'https://server.internal/cloud' + * $path = '/cloud/remote.php/dav/addressbooks/system/system/system/Database:alice.vcf' + * + * The response from the remote usually contains the webroot already and must be normalized to: + * https://server.internal/cloud/remote.php/dav/addressbooks/system/system/system/Database:alice.vcf */ $host = rtrim($host, '/') . '/';