Skip to content

Commit

Permalink
Drop <transport> element, reduce <push-transports> to <transports>
Browse files Browse the repository at this point in the history
  • Loading branch information
rfc2822 committed Sep 30, 2024
1 parent 9314e04 commit 461259a
Showing 1 changed file with 16 additions and 27 deletions.
43 changes: 16 additions & 27 deletions content.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ PROPFIND https://example.com/webdav/collection/
<?xml version="1.0" encoding="utf-8" ?>
<propfind xmlns="DAV:" xmlns:P="DAV:Push">
<prop>
<P:push-transports/>
<P:transports/>
<P:topic/>
</prop>
</propfind>
Expand All @@ -145,14 +145,12 @@ HTTP/1.1 207 Multi-Status
<response>
<href>/webdav/collection/</href>
<prop>
<P:push-transports>
<P:transport><P:web-push /></P:transport>
<P:transport>
<P:some-other-transport>
<P:some-parameter>...</P:some-parameter>
</P:some-other-transport>
</P:transport>
</P:push-transports>
<P:transports>
<P:web-push />
<P:some-other-transport>
<P:some-parameter>...</P:some-parameter>
</P:some-other-transport>
</P:transports>
<P:topic>O7M1nQ7cKkKTKsoS_j6Z3w</P:topic>
</prop>
</response>
Expand All @@ -167,17 +165,10 @@ In this case, the requested collection supports WebDAV-Push in general (because

## Element Definitions

Name: `push-transports`
Name: `transports`
Namespace: `DAV:Push`
Purpose: Indicates which push transports are supported by the server.
Definition: `<!ELEMENT push-transports (transport*)`
Example: see below

Name: `transport`
Namespace: `DAV:Push`
Purpose: Specifies a push transport (like Web Push).
[^todo] Why not omit this element and just put the transports directly into `push-transports`?
Definition: `<!ELEMENT transport (web-push | %other-transport)`
Definition: `<!ELEMENT transports (web-push | %other-transport)+`
Example: see below

Name: `topic`
Expand Down Expand Up @@ -447,7 +438,7 @@ Element definitions:

Name: `web-push`
Purpose: Specifies the Web Push transport.
Description: Used to specify the Web Push Transport in the context of a `<transport>` element, for instance in a list of supported transports.
Description: Used to specify the Web Push Transport in the context of a `<transports>` element, for instance in a list of supported transports.
Definition: `<!ELEMENT web-push (EMPTY)`
Example: `<web-push/>`

Expand Down Expand Up @@ -515,13 +506,11 @@ Example service detection of a WebDAV server that supports VAPID:
<response>
<href>/webdav/collection/</href>
<prop>
<P:push-transports>
<P:transport>
<P:web-push>
<server-public-key type="p256dh">BA1Hxzyi1RUM1b5wjxsn7nGxAszw2u61m164i3MrAIxHF6YK5h4SDYic-dRuU_RCPCfA5aq9ojSwk5Y2EmClBPs</server-public-key>
</P:web-push>
</P:transport>
</P:push-transports>
<P:transports>
<P:web-push>
<server-public-key type="p256dh">BA1Hxzyi1RUM1b5wjxsn7nGxAszw2u61m164i3MrAIxHF6YK5h4SDYic-dRuU_RCPCfA5aq9ojSwk5Y2EmClBPs</server-public-key>
</P:web-push>
</P:transports>
<P:topic>O7M1nQ7cKkKTKsoS_j6Z3w</P:topic>
</prop>
</response>
Expand Down Expand Up @@ -550,4 +539,4 @@ Example for a subscription registration requesting message encryption:
{::include xml/sample-registration-with-encryption.xml}
~~~

The server uses these data to encrypt the payload and send it to the push service. The client then decrypts the payload again.
The server uses these data to encrypt the payload and send it to the push service. The client then decrypts the payload again.

0 comments on commit 461259a

Please sign in to comment.