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] Allow sync of non .vcf resources. Contrib…
…utes to MER#1863 Previously, we only synced resources returned by the server in response to an etags request, if those resources ended in ".vcf". This commit modifies the behaviour so that we assume that any resource which has a suffix which is not ".vcf" (e.g., ".ics" or ".eml") should be ignored, but other resources without a suffix should be synced. This allows us to sync in cases where the remote resource is found at a path like "/carddav/Addressbooks/personal/johnsmith" rather than a path like "/carddav/Addressbooks/personal/johnsmith.vcf". Contributes to MER#1863
- Loading branch information
Chris Adams
committed
Apr 2, 2019
1 parent
e30631b
commit ff465bd
Showing
5 changed files
with
65 additions
and
2 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
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
20 changes: 20 additions & 0 deletions
20
tests/replyparser/data/replyparser_contactmetadata_single-vcf-and-non-vcf.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,20 @@ | ||
<d:multistatus xmlns:d="DAV:" xmlns:card="urn:ietf:params:xml:ns:carddav"> | ||
<d:response> | ||
<d:href>/addressbooks/johndoe/contacts/new.vcf</d:href> | ||
<d:propstat> | ||
<d:prop> | ||
<d:getetag>"0021-0021"</d:getetag> <!-- new uri/etag :. added --> | ||
</d:prop> | ||
<d:status>HTTP/1.1 200 OK</d:status> | ||
</d:propstat> | ||
</d:response> | ||
<d:response> | ||
<d:href>/addressbooks/johndoe/contacts/alsonew</d:href> | ||
<d:propstat> | ||
<d:prop> | ||
<d:getetag>"0022-0022"</d:getetag> <!-- new uri/etag :. added --> | ||
</d:prop> | ||
<d:status>HTTP/1.1 200 OK</d: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