Skip to content

Commit 9b718e7

Browse files
committed
Property/content updates
1 parent 969ac65 commit 9b718e7

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

content.mkd

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -255,27 +255,28 @@ Expired subscriptions MUST NOT be used anymore as chances are high that doing so
255255

256256
# Push Notification
257257

258-
A WebDAV-Push server MUST notify registered subscriptions when the content of a subscribed collection changes, this is when a member is added, changed or removed.
258+
A WebDAV-Push server MUST notify registered subscriptions of a subscribed collection:
259259

260-
This means that a notification is sent whenever the `{DAV:}sync-token` (as defined in {{RFC6578}}) or the historical `{http://calendarserver.org/ns/:}GetCTag` changes.
260+
- on a _content update_ of the collection: this is when a member is changed or removed, (as explained in {{RFC6578}}), so that the `{DAV:}sync-token` changes;
261+
- on a _property update_ of the colleciton: this is when
262+
- certain properties of the collection (like `DAV:{display-name}`) itself change,
263+
- or the property itself is removed, which changes its `{DAV:status}` to 4xx.
261264

262-
[^todo] Data vs. metadata, only about members or also the subscribed collection itself?
263-
264-
[^todo]CalDAV/CardDAV: subscribe home-set?
265+
[^todo] Which properties?
265266

266267

267268
## Push Message
268269

269-
The push message body consists of a `push-message` element, which contains a `{DAV:}propstat` element with
270+
The push message body consists of a `push-message` element, which contains a `{DAV:}propstat` element with a `{DAV:}prop` element that MUST contain the `topic` of the affected collection so that the client can identify it without doubt.
271+
272+
In case of a _content update_ of the affected collection, the `{DAV:}prop` element MUST contain a `{DAV:}sync-token` element to allow a client to ignore the push message when it already knows the latest state.
270273

271-
* an optional `{DAV:}status` element to notify the client that the collection has changed its status, and
272-
* a `{DAV:}prop` element that
274+
To indicate a _property update_ of the affected collection, a `{DAV:}status` element is added to the `{DAV:}prop` element:
273275

274-
* MUST contain the `topic` of the affected collection so that the client can identify it without doubt,
275-
* SHOULD contain a `{DAV:}sync-token` element (when available) to allow a client to ignore the push message when it already knows the latest state,
276-
* MUST NOT contain elements with sensitive data (unless message encryption is used).
276+
* status code 200 to indicate properties of the affected collection have changed,
277+
* status code 404 to indicate that the collection has been removed.
277278

278-
When the `{DAV:}status` element is present, it indicates a change of the status of the collection itself (and not its members). In this case, clients SHOULD check and process the relevant properties of the collection. Status code 404 or 410 is used to indicate that the collection has been removed.
279+
Clients can determine whether a push message notifies about a content and/or property update by checking the presence of `{DAV:}sync-token`.
279280

280281
When necessary or useful, a server MAY
281282

@@ -316,7 +317,7 @@ A server MAY use some logic like remembering the last successful delivery plus s
316317
[^todo] Specific implementation notes for CalDAV/CardDAV. Especially a recommendation of what clients shall subscribe to and why:
317318

318319
* homesets → content updates may trigger calendar list refresh
319-
* calendars → content updates may trigger sync, property updates may trigger calendar meta-data refresh
320+
* calendars / address books → content updates may trigger sync, property updates may trigger calendar meta-data refresh
320321
* principals → keep displayed user data up-to-date
321322

322323

0 commit comments

Comments
 (0)