Skip to content

Commit

Permalink
Build XMLRFC and then HTML/TXT from Markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
rfc2822 committed Sep 26, 2024
1 parent e23f80f commit f203bad
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 22 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build-rfc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build and publish document
on: push
# branches: [main]

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install packages
run: sudo apt-get install --no-install-recommends -y ruby-kramdown-rfc2629 xml2rfc

- name: Prepare output directory
run: mkdir build

- name: Kramdown to XML
run: kramdown-rfc2629 webdav-push.mkd >build/webdav-push.xml

- name: XML to HTML
run: (cd build; xml2rfc --html webdav-push.xml)
- name: XML to TXT
run: (cd build; xml2rfc --txt webdav-push.xml)

- name: Publish build
uses: actions/upload-pages-artifact@v3
with:
path: build
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.idea/
.obsidian/
.refcache/
4 changes: 4 additions & 0 deletions abstract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

Some Abstract

What Is It
41 changes: 19 additions & 22 deletions webdav-push-draft.md → content.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
WebDAV-Push – Draft Document (In Work)



# Introduction

Expand All @@ -20,7 +17,7 @@ Typical use cases:

## Architectural overview

![Architectural overview diagram](images/architecture.png)
<!-- <artwork type="svg" src="images/architecture.svg"/> -->


## Terminology
Expand Down Expand Up @@ -117,7 +114,7 @@ This section describes how a client can detect

Example:

```
~~~
PROPFIND https://example.com/webdav/collection/
<?xml version="1.0" encoding="utf-8" ?>
<propfind xmlns="DAV:" xmlns:P="DAV:Push">
Expand All @@ -137,15 +134,15 @@ HTTP/1.1 207 Multi-Status
<P:transport><P:web-push /></P:transport>
<P:transport>
<P:some-other-transport>
<P:some-parameter>...<P:some-parameter>
<P:some-parameter>...</P:some-parameter>
</P:some-other-transport>
</P:transport>
</P:push-transports>
<P:topic>O7M1nQ7cKkKTKsoS_j6Z3w</P:topic>
</prop>
</response>
</multistatus>
```
~~~

In this case, the requested collection supports WebDAV-Push in general (because it has a push topic). Two push transports can be used:

Expand Down Expand Up @@ -223,11 +220,11 @@ In any case, when a subscription is registered the first time, the server create

Sample request for Web Push:

```
~~~
POST https://example.com/webdav/collection/
Content-Type: application/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
\<?xml version="1.0" encoding="utf-8" ?\>
<push-register xmlns="DAV:Push">
<subscription>
<web-push-subscription>
Expand All @@ -239,7 +236,7 @@ Content-Type: application/xml; charset="utf-8"
HTTP/1.1 201 Created
Location: https://example.com/webdav/subscriptions/io6Efei4ooph
```
~~~



Expand Down Expand Up @@ -273,11 +270,11 @@ When a subscription registration is removed, no further push messages must be se

Sample request:

```
~~~
DELETE https://example.com/webdav/subscriptions/io6Efei4ooph
HTTP/1.1 204 Unregistered
```
~~~


## Expiration
Expand Down Expand Up @@ -335,12 +332,12 @@ The push message body contains the topic of the changed collection.

Sample push message body:

```
<?xml version="1.0" encoding="utf-8" ?>
~~~
\<?xml version="1.0" encoding="utf-8" ?\>
<push-message xmlns="DAV:Push">
<topic>O7M1nQ7cKkKTKsoS_j6Z3w</topic>
</push-message>
```
~~~

Push notification rate limit?

Expand Down Expand Up @@ -426,7 +423,7 @@ A WebDAV-Push server should use the collection topic as `Topic` header in push m

> **NOTE**: [UnifiedPush](https://unifiedpush.org/) (UP) is a specification which is intentionally designed as a 100% compatible subset of Web Push, together with a software that can be used to implement these documents. From a WebDAV-Push server perspective, UP endpoints can be seen as Web Push resources.
![Flowchart: WebDAV-Push over UnifiedPush](images/unifiedpush-flowchart.png)
<!-- <artwork type="svg" src="images/unifiedpush-flowchart.svg"/> -->


## Subscription
Expand Down Expand Up @@ -454,11 +451,11 @@ push resource). The push resource is used as the unique identifier for the subsc
Definition: `<!ELEMENT push-resource (#PCDATA)`
Example:

```
~~~
<web-push-subscription xmlns="DAV:Push">
<push-resource>https://push.example.net/push/JzLQ3raZJfFBR0aqvOMsLrt54w4rJUsV</push-resource>
</web-push-subscription>
```
~~~

> **TODO:** message encryption as defined in RFC 8291
Expand All @@ -483,13 +480,13 @@ As base64url: `R3iM_PAQ7OMDAXW4-mMna7rqSGI`

So push message delivery is requested with this header:

```
~~~
POST <push subscription URL>
Content-Type: application/xml; charset="UTF-8"
Topic: R3iM_PAQ7OMDAXW4-mMna7rqSGI
<push message>
```
<push message body>
~~~


### VAPID
Expand All @@ -498,4 +495,4 @@ Additional properties

### Message encryption

How to send the encrypted push message
How to send the encrypted push message
35 changes: 35 additions & 0 deletions webdav-push.mkd
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: Push for WebDAV
abbrev: WebDAV-Push
docname: draft-bitfire-webdav-push-00
category: exp

submissionType: independent
ipr: trust200902
workgroup: None
keyword: WebDAV
keyword: push

stand_alone: yes
pi: [toc, sortrefs, symrefs]

author:
-
ins: R. Hirner
name: Ricki Hirner
organization: bitfire.at
email: [email protected]

normative:
RFC2119:
RFC4918:


--- abstract

{::include abstract.md}


--- middle

{::include content.md}

0 comments on commit f203bad

Please sign in to comment.