Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[buteo-sync-plugin-carddav] Prefer definite addressbook resources. Co…
…ntributes to JB#43847 Some services (e.g. Memotoo) do not produce output which conforms to the RFC, specifically they don't tag their addressbook resources with the appropriate resource-type tag. Previously, we worked around that case by assuming that a resource which otherwise meet the requirements must be an addressbook resource. This commit fixes the behaviour so that we only assume that such a resource is an addressbook resource if NO OTHER resources are explicitly tagged with the appropriate resource-type tag. This fixes upsync with e.g. Yandex. Contributes to JB#43847
- Loading branch information
Chris Adams
committed
Apr 2, 2019
1 parent
2e038ef
commit 2fd6390
Showing
4 changed files
with
82 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
...lyparser/data/replyparser_addressbookinformation_addressbook-plus-collection-resource.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?xml version='1.0' encoding='utf-8'?> | ||
<D:multistatus xmlns:D="DAV:"> | ||
<D:response> | ||
<href xmlns="DAV:">/carddav/accountname%40server.tld/</href> | ||
<D:propstat> | ||
<D:prop> | ||
<D:displayname>Display Name</D:displayname> | ||
<D:resourcetype> | ||
<D:collection/> | ||
</D:resourcetype> | ||
</D:prop> | ||
<status xmlns="DAV:">HTTP/1.1 200 OK</status> | ||
</D:propstat> | ||
<D:propstat> | ||
<D:prop> | ||
<D:sync-token/> | ||
<getctag xmlns="http://calendarserver.org/ns/"/> | ||
</D:prop> | ||
<status xmlns="DAV:">HTTP/1.1 404 Not Found</status> | ||
</D:propstat> | ||
</D:response> | ||
<D:response> | ||
<href xmlns="DAV:">/carddav/accountname%40server.tld/addressbook/</href> | ||
<D:propstat> | ||
<D:prop> | ||
<D:displayname>Display Name</D:displayname> | ||
<D:resourcetype> | ||
<E:addressbook xmlns:E="urn:ietf:params:xml:ns:carddav"/> | ||
<D:collection/> | ||
</D:resourcetype> | ||
<getctag xmlns="http://calendarserver.org/ns/">123456789</getctag> | ||
</D:prop> | ||
<status xmlns="DAV:">HTTP/1.1 200 OK</status> | ||
</D:propstat> | ||
<D:propstat> | ||
<D:prop> | ||
<D:sync-token/> | ||
</D:prop> | ||
<status xmlns="DAV:">HTTP/1.1 404 Not Found</status> | ||
</D:propstat> | ||
</D:response> | ||
</D:multistatus> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters