caldav, carddav: support the CalendarServer getctag property#208
Open
kanocz wants to merge 1 commit into
Open
Conversation
Add a CTag field to Calendar and AddressBook. When set, the server reports it as the http://calendarserver.org/ns/ getctag property in PROPFIND, which clients (e.g. DAVx5, Apple) use to detect collection changes without enumerating every member's ETag. An empty CTag (the default) omits the property, preserving existing behavior.
Owner
|
I'm not super keen about adding support for non-standard extensions. Clients should upgrade to RFC 6578. |
Contributor
Author
|
It's "non standart", but de facto is... Apple introduced it and most third-party dav-clients uses it... and this allow to significantly reduce traffic and load on synchronization of big collection |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add optional support for the
getctagproperty from the CalendarServer extensionnamespace (
http://calendarserver.org/ns/).getctagis an opaque collection-leveltoken that changes whenever the collection's contents change, letting clients
(DAVx5, Apple, etc.) detect "did anything change?" with a single
PROPFINDon thecollection instead of enumerating every member's
ETag. It's widely supported andis the change-detection fallback for clients that don't use
sync-collection.Change
CTag stringfield tocaldav.Calendarandcarddav.AddressBook.internal.GetCTagelement,internal.GetCTagName, and aCalendarServerNamespaceconstant.propFindCalendar/propFindAddressBook, reportgetctagwhenCTagisnon-empty.
When
CTagis empty (the default), the property is omitted entirely, so existingbackends are unaffected.
Notes
property/namespace is also used for CardDAV address books (per the CalendarServer
convention and as implemented by SabreDAV / dav4jvm / Apple). The shared
internal.GetCTagreflects that; a clarifying comment is included in the code.