This repository has been archived by the owner on Mar 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
scheme.html
167 lines (167 loc) · 8.67 KB
/
scheme.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>URL Scheme for Activity Streams 2.0</title>
</head>
<body>
<h1>URL Scheme for Activity Streams 2.0</h1>
<p>Author: Akihiko Odaki <<a href="mailto:[email protected]">[email protected]</a>></p>
<p>Copyright © 2017 Akihiko Odaki. Licensed under
<a href="https://creativecommons.org/publicdomain/zero/1.0/deed.en">CC0
1.0</a>.</p>
<section>
<h2>Abstract</h2>
<p>This specification describes URL scheme to declare it is
Activity Streams 2.0.</p>
<section>
<h3>Author's Note</h3>
<p>This draft is written to implement intent feature in Mastodon, an
Activity Streams implementation.</p>
</section>
</section>
<section>
<h2>Status of This Document</h2>
<p><i>This section describes the status of this document at the time of
its publication. Other documents may supersede this document.</i></p>
<p>This document was published by the author as a proposal for Mastodon
and other Activity Streams applications. Please write comments
regarding this document to the following issue in Mastodon:<br>
<a href="https://github.com/tootsuite/mastodon/issues/2291">URL scheme
for remote follow, share buttons · Issue #2291 ·
tootsuite/mastodon</a></p>
<p>This document is expected to be useful also for other Activity Streams
applications. If you have any request to change for them, please
contact the author. E-mail is the most reliable means for that, but
OStatus2 is also acceptable. Send a note to
<a href="https://pawoo.net/@fn_aki">@[email protected]</a>.</p>
</section>
<section>
<h2>1. Introduction</h2>
<p>Chromium is a popular Web browser, and provides to implement a custom
protocol handler for some URL schemes. This defines a URL scheme
specific to Activity Streams 2.0 to take advantage of the feature.</p>
<p>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
" SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119].</p>
</section>
<section>
<h2>2. <code>web+activity+data</code> URL Scheme</h2>
<p>All of the requirements <code>data</code> scheme listed in
[RFC2397] are also requirements for <code>web+activity+data</code>
scheme, except that it is explicitly declared to be an Activity
Streams representation and <mediatype> defaults to
<code>application/activity+json;charset=UTF-8</code> if it is
omitted. As a shorthand, <code>application/activity+json</code> can be
omitted but the charset parameter supplied.</p>
</section>
<section>
<h2>3. <code>web+activity+https</code> URL Scheme</h2>
<p>All of the requirements for <code>https</code> scheme listed in
[RFC7230], Section 2.7.2 are also requirements for the
<code>web+activity+https</code> scheme, except that it is explicitly
declared to be an Activity Streams representation, and the user agent
MUST set
<code>application/ld+json; profile="https://www.w3.org/ns/activitystreams"</code>
for the <code>Accept</code> header field defined in [RFC7231], Section
5.3.2.</p>
<p>The syntax is specified using the following [ABNF] syntax
description.</p>
<p>authority = <authority, see [RFC3986], Section 3.2><br>
path-abempty = <path-abempty, see [RFC3986], Section 3.3><br>
query = <query, see [RFC3986], Section 3.4><br>
fragment = <fragment, see [RFC3986], Section 3.5><br>
web-activity-https-URI = "web+activity+https:" "//" authority
path-abempty [ "?" query ]
[ "#" fragment ]</p>
</section>
<section>
<h2>4. Implementation Notes</h2>
<section>
<h3>4.1 Writing URLs of Activity Streams Representations</h3>
<p><i>This section is non-normative.</i></p>
<p>The main use case of schemes defined in this specification is to
allow more Web browsers to have a custom handler. If writing a URL of
Activity Streams representation for public and it is intended to be
processed by Activity Streams applications, the link SHOULD use those
schemes for better compatibility.</p>
<p>If the URLs are intended to be processed by a generic application
rather than Activity Streams applications, the link SHOULD NOT use
schemes defined in this specification. For example, if a URL is
specified as <code>href</code> attribute of <code>a</code>
element with truthy <code>download</code> attribute, its scheme
SHOULD be <code>https</code> rather than
<code>web+activity+https</code>. Here, <code>href</code> attribute,
<code>a</code> element and <code>download</code> attribute are
specified in [HTML5].</p>
</section>
<section>
<h3>4.2 Consuming URLs of Activity Streams Representations</h3>
<p><i>This section is non-normative.</i></p>
<p>If a consumer of URLs understands <code>web+activity+data</code>
scheme, it SHOULD understand <code>data</code> scheme for the same
purposes to achieve interoperability.</p>
<p>If a consumer of URLs understands <code>web+activity+https</code>
scheme, it SHOULD understand <code>https</code> scheme for the same
purposes to achieve better interoperability.</p>
</section>
<section>
<h3>4.3 Advertising the Use of Schemes</h3>
<p><i>This section is non-normative.</i></p>
<p>A public provider of schemes defined in this specification SHOULD
advertise the use of the schemes for potential consumers.</p>
</section>
</section>
<section>
<h2>5. Security Considerations</h2>
<p><i>This section is non-normative.</i></p>
<p>A scheme corresponding to <code>http</code> scheme is not defined in
this document and URLs such a scheme SHOULD NOT be used to deliver
them to public.</p>
</section>
<section>
<h2>A. References</h2>
<section>
<h3>A.1 Normative References</h3>
<dl>
<dt>[ABNF]</dt>
<dd>Augmented BNF for Syntax Specifications: ABNF. D. Crocker, Ed.;
P. Overell. IETF. January 2008. Internet Standard. URL:
<a href="https://tools.ietf.org/html/rfc5234">https://tools.ietf.org/html/rfc5234</a></dd>
<dt>[Activity Streams 2.0]</dt>
<dd>James M Snell; Evan Prodromou. W3C.
URL:
<a href="https://www.w3.org/TR/activitystreams-core/">https://www.w3.org/TR/activitystreams-core/</a></dd>
<dt>[RFC2119]</dt>
<dd>Key words for use in RFCs to Indicate Requirement Levels. S.
Bradner. IETF. March 1997. Best Current Practice. URL:
<a href="https://tools.ietf.org/html/rfc2119">https://tools.ietf.org/html/rfc2119</a></dd>
<dt>[RFC2397]</dt>
<dd>The "data" URL scheme: L. Masinter. Internet Standard. URL:
<a href="https://tools.ietf.org/html/rfc2397">https://tools.ietf.org/html/rfc2397</a></dd>
<dt>[RFC3986]</dt>
<dd>Uniform Resource Identifier (URI): Generic Syntax. T. Berners-Lee;
R. Fielding; L. Masinter. IETF. January 2005. Internet Standard.
URL: <a href="https://tools.ietf.org/html/rfc3986">https://tools.ietf.org/html/rfc3986</a></dd>
<dt>[RFC7230]</dt>
<dd>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing:
R. Fielding; J. Reschke. Internet Standard. URL:
<a href="https://tools.ietf.org/html/rfc7230">https://tools.ietf.org/html/rfc7230</a></dd>
<dt>[RFC7231]</dt>
<dd>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content:
R. Fielding; J. Reschke. Internet Standard. URL:
<a href="https://tools.ietf.org/html/rfc7231">https://tools.ietf.org/html/rfc7231</a></dd>
</dl>
</section>
<section>
<h3>A.2 Informative References</h3>
<dl>
<dt>[HTML5]</dt>
<dd>HTML5. Ian Hickson; Robin Berjon; Steve Faulkner; Travis Leithead;
Erika Doyle Navara; Theresa O'Connor; Silvia Pfeiffer. W3C. URL:
<a href="https://www.w3.org/TR/html5/">https://www.w3.org/TR/html5/</a></dd>
</dl>
</section>
</section>
</body>
</html>