Skip to content

Commit

Permalink
Use URI namespace within our domain (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
rfc2822 authored Nov 13, 2024
1 parent 230d5e2 commit 4d20d50
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions content.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Clients can use WebDAV `PROPFIND` to retrieve these properties. Example:
~~~
PROPFIND https://example.com/webdav/collection/
<?xml version="1.0" encoding="utf-8" ?>
<propfind xmlns="DAV:" xmlns:P="DAV:Push">
<propfind xmlns="DAV:" xmlns:P="https://bitfire.at/webdav-push">
<prop>
<P:transports/>
<P:topic/>
Expand All @@ -168,7 +168,7 @@ The comment shows how support for some other (not yet defined) transport could b

## Subscription Registration

To subscribe to a collection, the client sends a `POST` request with `Content-Type: application/xml` to the collection it wants to subscribe. The root XML element of the XML body is `push-register` in the WebDAV-Push namespace (`DAV:Push`) and can be used to distinguish between a WebDAV-Push and other requests.
To subscribe to a collection, the client sends a `POST` request with `Content-Type: application/xml` to the collection it wants to subscribe. The root XML element of the XML body is `push-register` in the WebDAV-Push namespace (`https://bitfire.at/webdav-push`) and can be used to distinguish between a WebDAV-Push and other requests.

The `push-register` element contains exactly one `subscription` element, which contains all information the server needs to send a push message.

Expand Down Expand Up @@ -452,7 +452,7 @@ The server uses these data to encrypt the payload and send it to the push servic

# XML Schema

When XML element names are used without namespace in this document, they are in the WebDAV-Push namespace (`DAV:Push`). All XML elements defined by this document reside in this namespace.
When XML element names are used without namespace in this document, they are in the WebDAV-Push namespace (`https://bitfire.at/webdav-push`). All XML elements defined by this document reside in this namespace.

To reference element names in another namespace, the `{ns}element` syntax is used. For instance, `{DAV:}prop` means the `prop` XML element in the `DAV:` namespace.

Expand Down
2 changes: 1 addition & 1 deletion xml/sample-propfind-multistatus-with-vapid.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<multistatus xmlns="DAV:" xmlns:P="DAV:Push">
<multistatus xmlns="DAV:" xmlns:P="https://bitfire.at/webdav-push">
<response>
<href>/webdav/collection/</href>
<prop>
Expand Down
4 changes: 2 additions & 2 deletions xml/sample-propfind-multistatus.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<multistatus xmlns="DAV:" xmlns:P="DAV:Push">
<multistatus xmlns="DAV:" xmlns:P="https://bitfire.at/webdav-push">
<response>
<href>/webdav/collection/</href>
<prop>
Expand All @@ -11,7 +11,7 @@
</P:some-other-transport>
-->
</P:transports>
<P:topic xmlns="DAV:Push">O7M1nQ7cKkKTKsoS_j6Z3w</P:topic>
<P:topic xmlns="https://bitfire.at/webdav-push">O7M1nQ7cKkKTKsoS_j6Z3w</P:topic>
</prop>
</response>
</multistatus>
2 changes: 1 addition & 1 deletion xml/sample-push-message1.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<P:push-message xmlns:D="DAV:" xmlns:P="DAV:Push">
<P:push-message xmlns:D="DAV:" xmlns:P="https://bitfire.at/webdav-push">
<D:propstat>
<D:prop>
<P:topic>O7M1nQ7cKkKTKsoS_j6Z3w</P:topic>
Expand Down
2 changes: 1 addition & 1 deletion xml/sample-push-message2.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<P:push-message xmlns:P="DAV:Push">
<P:push-message xmlns:P="https://bitfire.at/webdav-push">
<D:propstat xmlns:D="DAV:">
<D:status>404 Not Found</D:status>
<D:prop>
Expand Down
2 changes: 1 addition & 1 deletion xml/sample-registration-with-encryption.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<push-register xmlns="DAV:Push">
<push-register xmlns="https://bitfire.at/webdav-push">
<subscription>
<web-push-subscription>
<push-resource>https://up.example.net/yohd4yai5Phiz1wi</push-resource>
Expand Down
2 changes: 1 addition & 1 deletion xml/sample-registration.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<push-register xmlns="DAV:Push">
<push-register xmlns="https://bitfire.at/webdav-push">
<subscription>
<web-push-subscription>
<push-resource>https://up.example.net/yohd4yai5Phiz1wi</push-resource>
Expand Down
2 changes: 1 addition & 1 deletion xml/sample-web-push-subscription.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<web-push-subscription xmlns="DAV:Push">
<web-push-subscription xmlns="https://bitfire.at/webdav-push">
<push-resource>https://push.example.net/push/JzLQ3raZJfFBR0aqvOMsLrt54w4rJUsV</push-resource>
</web-push-subscription>
2 changes: 1 addition & 1 deletion xml/webdav-push.rng
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<grammar xmlns="http://relaxng.org/ns/structure/1.0" ns="DAV:Push">
<grammar xmlns="http://relaxng.org/ns/structure/1.0" ns="https://bitfire.at/webdav-push">

<!-- New WebDAV Collection Properties -->

Expand Down

0 comments on commit 4d20d50

Please sign in to comment.