Skip to content

Commit e84fc0c

Browse files
committed
Build XMLRFC and then HTML/TXT from Markdown
1 parent e23f80f commit e84fc0c

File tree

5 files changed

+90
-22
lines changed

5 files changed

+90
-22
lines changed

.github/workflows/build-rfc.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build and publish document
2+
on: push
3+
# branches: [main]
4+
5+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
6+
permissions:
7+
contents: read
8+
pages: write
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Install packages
15+
run: sudo apt-get install --no-install-recommends -y ruby-kramdown-rfc2629 xml2rfc
16+
17+
- name: Prepare output directory
18+
run: mkdir build
19+
20+
- name: Kramdown to XML
21+
run: kdrfc -x webdav-push.md >build/webdav-push.xml
22+
23+
- name: XML to HTML
24+
run: (cd build; xml2rfc --html webdav-push.xml)
25+
- name: XML to TXT
26+
run: (cd build; xml2rfc --txt webdav-push.xml)
27+
28+
- name: Publish build
29+
uses: actions/upload-pages-artifact@v3
30+
with:
31+
path: build

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.idea/
22
.obsidian/
3+
.refcache/

abstract.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
Some Abstract
3+
4+
What Is It

webdav-push-draft.md renamed to content.md

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
WebDAV-Push – Draft Document (In Work)
2-
3-
41

52
# Introduction
63

@@ -20,7 +17,7 @@ Typical use cases:
2017

2118
## Architectural overview
2219

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

2522

2623
## Terminology
@@ -117,7 +114,7 @@ This section describes how a client can detect
117114

118115
Example:
119116

120-
```
117+
~~~
121118
PROPFIND https://example.com/webdav/collection/
122119
<?xml version="1.0" encoding="utf-8" ?>
123120
<propfind xmlns="DAV:" xmlns:P="DAV:Push">
@@ -137,15 +134,15 @@ HTTP/1.1 207 Multi-Status
137134
<P:transport><P:web-push /></P:transport>
138135
<P:transport>
139136
<P:some-other-transport>
140-
<P:some-parameter>...<P:some-parameter>
137+
<P:some-parameter>...</P:some-parameter>
141138
</P:some-other-transport>
142139
</P:transport>
143140
</P:push-transports>
144141
<P:topic>O7M1nQ7cKkKTKsoS_j6Z3w</P:topic>
145142
</prop>
146143
</response>
147144
</multistatus>
148-
```
145+
~~~
149146

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

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

224221
Sample request for Web Push:
225222

226-
```
223+
~~~
227224
POST https://example.com/webdav/collection/
228225
Content-Type: application/xml; charset="utf-8"
229226
230-
<?xml version="1.0" encoding="utf-8" ?>
227+
\<?xml version="1.0" encoding="utf-8" ?\>
231228
<push-register xmlns="DAV:Push">
232229
<subscription>
233230
<web-push-subscription>
@@ -239,7 +236,7 @@ Content-Type: application/xml; charset="utf-8"
239236
240237
HTTP/1.1 201 Created
241238
Location: https://example.com/webdav/subscriptions/io6Efei4ooph
242-
```
239+
~~~
243240

244241

245242

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

274271
Sample request:
275272

276-
```
273+
~~~
277274
DELETE https://example.com/webdav/subscriptions/io6Efei4ooph
278275
279276
HTTP/1.1 204 Unregistered
280-
```
277+
~~~
281278

282279

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

336333
Sample push message body:
337334

338-
```
339-
<?xml version="1.0" encoding="utf-8" ?>
335+
~~~
336+
\<?xml version="1.0" encoding="utf-8" ?\>
340337
<push-message xmlns="DAV:Push">
341338
<topic>O7M1nQ7cKkKTKsoS_j6Z3w</topic>
342339
</push-message>
343-
```
340+
~~~
344341

345342
Push notification rate limit?
346343

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

427424
> **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.
428425
429-
![Flowchart: WebDAV-Push over UnifiedPush](images/unifiedpush-flowchart.png)
426+
<!-- <artwork type="svg" src="images/unifiedpush-flowchart.svg"/> -->
430427

431428

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

457-
```
454+
~~~
458455
<web-push-subscription xmlns="DAV:Push">
459456
<push-resource>https://push.example.net/push/JzLQ3raZJfFBR0aqvOMsLrt54w4rJUsV</push-resource>
460457
</web-push-subscription>
461-
```
458+
~~~
462459

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

484481
So push message delivery is requested with this header:
485482

486-
```
483+
~~~
487484
POST <push subscription URL>
488485
Content-Type: application/xml; charset="UTF-8"
489486
Topic: R3iM_PAQ7OMDAXW4-mMna7rqSGI
490487
491-
<push message>
492-
```
488+
<push message body>
489+
~~~
493490

494491

495492
### VAPID
@@ -498,4 +495,4 @@ Additional properties
498495

499496
### Message encryption
500497

501-
How to send the encrypted push message
498+
How to send the encrypted push message

webdav-push.mkd

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: Push for WebDAV
3+
abbrev: WebDAV-Push
4+
docname: draft-bitfire-webdav-push-00
5+
category: exp
6+
7+
submissionType: independent
8+
ipr: trust200902
9+
workgroup: None
10+
keyword: WebDAV
11+
keyword: push
12+
13+
stand_alone: yes
14+
pi: [toc, sortrefs, symrefs]
15+
16+
author:
17+
-
18+
ins: R. Hirner
19+
name: Ricki Hirner
20+
organization: bitfire.at
21+
22+
23+
normative:
24+
RFC2119:
25+
RFC4918:
26+
27+
28+
--- abstract
29+
30+
{::include abstract.md}
31+
32+
33+
--- middle
34+
35+
{::include content.md}

0 commit comments

Comments
 (0)