You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This document specifies a protocol to notify WebDAV clients when the content or properties of a resource or its members are changed on the WebDAV server.
2
2
3
-
Currently, the only specified transport for these push notifications is is Web Push (RFC 8030). However, the protocol could be used with other transports as well.
3
+
Currently, the only specified transport for these push notifications is Web Push (RFC 8030). However, the protocol could be used with other transports as well.
Copy file name to clipboardExpand all lines: content.mkd
+26-32Lines changed: 26 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,7 @@ A WebDAV-Push client typically
60
60
- connects to a push service (which is usually not operated by the same party as the WebDAV server),
61
61
- subscribes to one or more resources on the server (with the data received from the push service),
62
62
- receives push notifications that cause some client-side action (like to refresh the view or run synchronization),
63
-
- re-subscribes to resources before the subscriptions expire,
63
+
- re-subscribes to resources before the registrations expire,
64
64
- unsubscribes from resources when notifications are not needed anymore.
65
65
66
66
WebDAV-Push is not restricted to a specific push transport. This allows even upcoming, yet unknown push transports to be used with WebDAV-Push. Push transport definitions can define extra properties and additional processing rules.
@@ -141,18 +141,18 @@ Here, the OPTIONS response contains "webdav-push" in the DAV header to indicate
141
141
142
142
## Push Properties {#push-properties}
143
143
144
-
To provide information about WebDAV-Push support, new properties are defined. A WebDAV-Push server MUST provide the `transports`, `topic` and `supported-triggers` properties for resources that support WebDAV-Push. A WebDAV-Push server MUST NOT provide the `topic` and `supported-triggers` properties for resources that don't support WebDAV-Push (for instance for non-collection resources, if they're not supported).
144
+
To provide information about WebDAV-Push support, new properties are defined. A server MUST provide the `transports`, `topic` and `supported-triggers` properties for resources that support WebDAV-Push. A server MUST NOT provide the `topic` and `supported-triggers` properties for resources that don't support WebDAV-Push (for instance for non-collection resources, if they're not supported).
145
145
146
146
The `transports` element lists available push transports. Within the scope of this document, the only supported transport is `web-push` (see {{transport-web-push}}). Although the property is defined on every Push-capable resource, its value is usually the same for every resource on the server.
147
147
148
-
The `topic` is a globally unique identifier for the resource. A specific resource could be reachable with different URLs, but it can have only one push topic. A server could for instance use a random UUID or a canonical URL that won't change over the lifetime of the resource. The `topic` should be globally unique because a client can subscribe to resources from multiple servers and needs to be able to determine the correct one when it receives a push message.
148
+
The `topic` is a globally unique identifier for the resource. A specific resource could be reachable with different URLs, but it can have only one push topic. A server could for instance use a random UUID or a canonical URL that won't change over the lifetime of the resource. The value should be globally unique because a client can subscribe to resources from multiple servers and needs to be able to determine the correct one when it receives a push message.
149
149
150
150
The `supported-triggers` element MUST contain at least one of the following elements:
151
151
152
152
-`content-update` if the resource supports push notifications on content updates (see {{content-updates}}). It contains a `{DAV:}depth` property that indicates the maximum supported depth.
153
153
-`property-update` if the resource supports push notifications on property updates (see {{property-updates}}). It contains a `{DAV:}depth` property that indicates the maximum supported depth.
154
154
155
-
Clients can use WebDAV `PROPFIND` to retrieve these properties.
155
+
Clients can use WebDAV `PROPFIND` to retrieve these properties. WebDAV-Push SHOULD only be advertised to clients which are actually allowed to use it.
156
156
157
157
Example:
158
158
@@ -180,9 +180,6 @@ The comment shows how support for some other (not yet defined) transport could b
180
180
181
181
# Subscription Management
182
182
183
-
WebDAV-Push SHOULD only be advertised to clients which are actually allowed to use it.
184
-
185
-
186
183
## Subscription Registration
187
184
188
185
To subscribe to a resource, the client sends a `POST` request with `Content-Type: application/xml` to the resource it wants to subscribe. The root XML element of the XML body is `push-register` and can be used to distinguish between WebDAV-Push and other requests.
@@ -197,22 +194,22 @@ The `subscription` element specifies a subscription that shall be notified on up
197
194
198
195
To specify which updates the client wants to be notified about, it uses the `trigger` element, which itself can contain:
199
196
200
-
* A `content-update` element to indicate the client's interest in notifications when the contents of the subscribed resource or its members change (_content update_).
201
-
* A `property-update` element to indicate the client's interest in notifications when the WebDAV properties of the subscribed resource or its members change (_property update_).
197
+
* A `content-update` element to indicate the client's interest in notifications when the contents of the subscribed resource or its members change ("content update").
198
+
* A `property-update` element to indicate the client's interest in notifications when the WebDAV properties of the subscribed resource or its members change ("property update").
202
199
203
-
WebDAV-Push is intended more as a helpful tool to speed up things (like synchronization) than a strict query processor. So subscriptions are processed in a relaxed way: the server does its best to fulfill the request, but if a certain trigger is not available, it's downgraded or ignored instead of rejected with an error response. If a client needs to know which triggers are supported, it can use `PROPFIND` with `supported-triggers`.
200
+
WebDAV-Push is intended more as a helpful tool to speed up things (like synchronization) than a strict query processor. So subscriptions are processed in a relaxed way: the server does its best to fulfill the request, but if a certain trigger is not available, it's downgraded or ignored instead of rejected with an error response. If a client needs to know which triggers are supported, it can use `PROPFIND` with `supported-triggers`. A client MUST expect the server to downgrade or ignore certain triggers when they're not (fully) supported, and MUST be prepared to receive an error when it registers a subscription with only unsupported triggers.
204
201
205
202
### Content Updates {#content-updates}
206
203
207
-
A _content update_ occurs when the subscribed resource or a member is changed or removed, as defined in {{Section 3.5 of RFC6578}}. Typically this is the case when the resource itself or a member is added or removed or the contents are modified. If the server supports {{RFC6578}}, a content update implies that the `{DAV:}sync-token` changes.
204
+
A "content update" occurs when the subscribed resource or a member is changed or removed, as defined in {{Section 3.5 of RFC6578}}. Typically, this is the case when the resource itself is modified or removed, or when a member is added or removed or its contents are modified. If the server supports {{RFC6578}}, a content update of a collection usually implies that the `{DAV:}sync-token` changes.
208
205
209
206
The `content` element contains a `{DAV:}depth` element that specifies whether the client is interested
210
207
211
208
- only in content updates of the subscribed resource (depth: `0`),
212
-
- only in content updates of the subscribed resource and internal members (depth: `1`), or
213
-
- in content updates of the subscribed resource and all members (depth: `infinite`).
209
+
- only in content updates of the subscribed resource and its internal members (depth: `1`), or
210
+
- in content updates of the subscribed resource and its members (depth: `infinite`).
214
211
215
-
On a collection, a content update with a depth of zero only occurs when the collection has an assigned entity body that is returned by `GET` and that body changes. Server support for content updates with a depth of zero on collections is OPTIONAL.
212
+
A content update of a collection itself (not of a member) only occurs when the collection has an entity body that is returned by `GET` and that body changes. A server MAY ignore such changes and not send notifications in that case.
216
213
217
214
A server SHOULD support content update notifications with a depth of at least `1` for every Push-capable collection.
218
215
@@ -222,21 +219,25 @@ In case the depth is `infinite`, the limitations described in {{Section 3.3 of R
222
219
223
220
### Property Updates {#property-updates}
224
221
225
-
A _property update_ occurs when the WebDAV properties of the subscribed resource or its members are modified. Notifications about properties update are controlled by two elements within `properties`:
222
+
A "property update" occurs when the WebDAV properties of the subscribed resource or its members are modified. Notifications about properties update are controlled by two elements within `properties`:
226
223
227
224
1. The `{DAV:}depth` element specifies whether the client is interested
228
225
229
-
- only in property updates of the subscribed resource (depth: `0`),
230
-
- only in property updates of the subscribed resource and internal members (depth: `1`), or
231
-
- in property updates of the subscribed resource and all members (depth: `infinite`).
226
+
- only in property updates of the subscribed resource (depth: `0`),
227
+
- only in property updates of the subscribed resource and its internal members (depth: `1`), or
228
+
- in property updates of the subscribed resource and its members (depth: `infinite`).
229
+
230
+
If the resource doesn't support the property update trigger with the requested depth, it MUST fall back to the lowest supported value instead. If the resource doesn't support the property update trigger at all, it MUST be ignored.
231
+
232
+
In case the depth is `infinite`, the limitations described in {{Section 3.3 of RFC6578}} apply: notifications about changes in members which are not supported by the `DAV:sync-collection` report may not be sent.
232
233
233
-
If the resource doesn't support the property update trigger with the requested `{DAV:}depth`, it MUST fall back to the lowest supported value instead. If the resource doesn't support the property update trigger at all, it MUST be ignored.
234
+
2. The optional `{DAV:}prop` element (as used in a `PROPFIND` request) specifies a list of properties that the client is interested in.
234
235
235
-
In case the `{DAV:}depth`is `infinite`, the limitations described in {{Section 3.3 of RFC6578}} apply: notifications about changes in members which are not supported by the `DAV:sync-collection` report may not be sent.
236
+
If the `{DAV:}prop` element is empty or not present, the server chooses a list of properties that it considers to be useful for the client. If the `{DAV:}prop` element is present and contains properties for which property update notifications are not supported, the server MUST ignore those unsupported properties. Also, a server MAY ignore the contents of a `{DAV:prop}` element at all and treat it like if it was empty or not present.
236
237
237
-
2. The optional `{DAV:}prop` element (as used in a `PROPFIND` request) specifies a list of properties that the client is interested in. If the`{DAV:}prop` element is empty or not present, the server chooses a list of properties that it considers to be useful for the client.
238
+
Neither a server nor a client SHOULD use property updates for properties that automatically change on a content update, like`{DAV:}getetag`, `{DAV:}getlastmodified` and `{DAV:}sync-token`, because this would implicitly cause a property update for every content update. Notifications about content updates should instead be requested/sent explicitly as content update notifications.
238
239
239
-
This list of properties MUST NOT contain properties that represent a content update, especially `{DAV:}getetag`, `{DAV:}getlastmodified` and `{DAV:}sync-token`. If the `{DAV:}prop` element is present and contains properties for which property update notifications are not supported, the server MUST ignore those unsupported properties. Also, a server MAY ignore the contents of a `{DAV:prop}` element at all and treat it like if it was empty or not present.
240
+
The removal of a resource, including the subscribed resource, is not considered as a property update, but as a content update.
Example 2: A client registers a content update trigger with a `{DAV:}depth` of `infinite` and a property update trigger with a `{DAV:}depth` of `1`, but the collection supports only content update triggers with a `{DAV:}depth` of `1` and doesn't support the property update trigger at all, it registers the subscription and responds with 201. Notifications will then only be sent on content updates with a `{DAV:}depth` of `1` (trigger downgraded by server). On property updates, notifications will not be sent (trigger ignored by server).
272
+
Example 2: A client registers a content update trigger with a depth of `infinite` and a property update trigger with a depth of `1`, but the collection supports only content update triggers with a depth of `1` and doesn't support the property update trigger at all, it registers the subscription and responds with 201. Notifications will then only be sent on content updates with a depth of `1` (trigger downgraded by server). On property updates, notifications will not be sent (trigger ignored by server).
272
273
273
-
Example 3: A client registers a property update trigger with a `{DAV:}depth` of `0` and the collection doesn't support property update triggers at all, the server ignores the trigger. So all triggers of the request are ignored and the server responds with 403 with `no-supported-trigger`.
274
+
Example 3: A client registers a property update trigger with a depth of `0` and the collection doesn't support property update triggers at all, the server ignores the trigger. So all triggers of the request are ignored and the server responds with 403 with `no-supported-trigger`.
274
275
275
276
276
277
## Subscription Updates
@@ -358,14 +359,7 @@ A server MAY use some logic like remembering the last successful delivery plus s
358
359
359
360
360
361
361
-
# Interoperability
362
-
363
-
## Client Guidelines
364
-
365
-
Before registering a subscription, a client SHOULD check whether the transport is supported and which triggers are supported (usually with the same `PROPFIND` request that requests details like the VAPID public key). The client MUST expect the server to downgrade or ignore certain triggers when they're not (fully) supported. The client MUST be prepared to receive an error when it registers a subscription with only unsupported triggers.
366
-
367
-
368
-
## CalDAV/CardDAV
362
+
# CalDAV/CardDAV
369
363
370
364
WebDAV-Push can be used with CalDAV ({{RFC4791}}) and CardDAV ({{RFC6352}}) to provide short-time update notifications when collections (calendars, address books) or entries (contacts, events, …) change.
0 commit comments