@@ -133,7 +133,14 @@ server-side runtimes, and on the long term to upstream those changes into the WH
133
133
<p> The changes from the WHATWG spec so far are:
134
134
135
135
<ul>
136
- <li><p> (none)
136
+ <li><p> Added [[#conformance-classes]] to describe the various types of runtimes implementing this
137
+ fork.
138
+
139
+ <li><p> Made the <a>forbidden request-header</a> and <a>forbidden response-header name</a>
140
+ definitions dependent on whether the user agent <a>supports CORS</a> and
141
+ <a lt="support cookies">cookies</a> . This affects the headers of <a>basic filtered responses</a> ,
142
+ as well as <a for=Headers lt=validate>validation</a> in {{Headers}} objects. The behavior for web
143
+ browsers doesn't change.
137
144
</ul>
138
145
139
146
<p class=XXX> Please update this list as new changes are added.
@@ -143,9 +150,6 @@ server-side runtimes, and on the long term to upstream those changes into the WH
143
150
<ul>
144
151
<li><p> Remove CORS restrictions for runtimes with no concept of origins.
145
152
146
- <li><p> Specify how headers are filtered in {{Request}} and {{Response}} instances in various
147
- runtimes.
148
-
149
153
<li><p> Specify how relative URLs resolve in {{fetch}} and the {{Request}} constructor for runtimes
150
154
without a concept of <a>API base URL</a> .
151
155
@@ -202,6 +206,32 @@ exposes most of the networking functionality at a fairly low level of abstractio
202
206
203
207
204
208
209
+ <h2 id=conformance-classes>Conformance classes</h2>
210
+
211
+ <p> This specification applies to any <a spec="infra">user agent</a> that chooses to implement it.
212
+ However, different types of user agent have different needs in regards to fetching, and so this
213
+ specification defines different categories among which implementers might fall.
214
+
215
+ <p> A user agent implementing this specification:
216
+
217
+ <dl>
218
+ <dt> <dfn>supports CORS</dfn> </dt>
219
+ <dd> if it has a concept of an <a for=/>origin</a> which the current EcmaScript execution context
220
+ runs in, and which defines a security boundary with code and data from other origins. [[!HTML]]
221
+ [[ORIGIN]]
222
+
223
+ <dt> <dfn>supports cookies</dfn> </dt>
224
+ <dd> if it supports the user agent requirements of [[!COOKIES]] . For the purposes of this
225
+ specification, user agents which don't <a>support cookies</a> must act as if they were configured
226
+ to block cookies for all requests and responses (see
227
+ <a href=https://httpwg.org/specs/rfc6265.html#privacy-considerations>section 7</a> of
228
+ [[!COOKIES]] )).
229
+ </dl>
230
+
231
+ <p class=note> Web browsers support both CORS and cookies.
232
+
233
+
234
+
205
235
<h2 id=infrastructure>Infrastructure</h2>
206
236
207
237
<p> This specification depends on the Infra Standard. [[!INFRA]]
@@ -1177,20 +1207,14 @@ is a <a>byte-case-insensitive</a> match for one of
1177
1207
<ul class=brief>
1178
1208
<li> `<code> Accept-Charset</code> `
1179
1209
<li> `<code> Accept-Encoding</code> `
1180
- <li> `<a http-header><code>Access-Control-Request-Headers</code></a> `
1181
- <li> `<a http-header><code>Access-Control-Request-Method</code></a> `
1182
1210
<li> `<code> Connection</code> `
1183
1211
<li> `<code> Content-Length</code> `
1184
- <li> `<code> Cookie</code> `
1185
- <li> `<code> Cookie2</code> `
1186
1212
<li> `<code> Date</code> `
1187
1213
<li> `<code> DNT</code> `
1188
1214
<li> `<code> Expect</code> `
1189
1215
<li> `<code> Host</code> `
1190
1216
<li> `<code> Keep-Alive</code> `
1191
- <li> `<a http-header><code>Origin</code></a> `
1192
1217
<li> `<code> Referer</code> `
1193
- <li> `<code> Set-Cookie</code> `
1194
1218
<li> `<code> TE</code> `
1195
1219
<li> `<code> Trailer</code> `
1196
1220
<li> `<code> Transfer-Encoding</code> `
@@ -1200,6 +1224,30 @@ is a <a>byte-case-insensitive</a> match for one of
1200
1224
1201
1225
<p> then return true.
1202
1226
1227
+ <li>
1228
+ <p> If the user agent <a>supports CORS</a> and <var> name</var> is a <a>byte-case-insensitive</a>
1229
+ match for one of:
1230
+
1231
+ <ul class=brief>
1232
+ <li> `<a http-header><code>Access-Control-Request-Headers</code></a> `
1233
+ <li> `<a http-header><code>Access-Control-Request-Method</code></a> `
1234
+ <li> `<a http-header><code>Origin</code></a> `
1235
+ </ul>
1236
+
1237
+ <p> then return true.
1238
+
1239
+ <li>
1240
+ <p> If the user agent <a>supports cookies</a> and <var> name</var> is a <a>byte-case-insensitive</a>
1241
+ match for one of:
1242
+
1243
+ <ul class=brief>
1244
+ <li> `<code> Cookie</code> `
1245
+ <li> `<code> Cookie2</code> `
1246
+ <li> `<code> Set-Cookie</code> `
1247
+ </ul>
1248
+
1249
+ <p> then return true.
1250
+
1203
1251
<li><p> If <var> name</var> when <a>byte-lowercased</a> <a for="byte sequence">starts with</a>
1204
1252
`<code> proxy-</code> ` or `<code> sec-</code> `, then return true.
1205
1253
@@ -1239,13 +1287,16 @@ is a <a>byte-case-insensitive</a> match for one of
1239
1287
</div>
1240
1288
</div>
1241
1289
1242
- <p> A <dfn export>forbidden response-header name</dfn> is a <a for=/>header name</a> that is a
1243
- <a>byte-case-insensitive</a> match for one of:
1290
+ <div algorithm>
1291
+ <p> A <a for=/>header name</a> <var> name</var> is a <dfn export>forbidden response-header name</dfn>
1292
+ if the user agent <a>supports cookies</a> and <var> name</var> is a <a>byte-case-insensitive</a>
1293
+ match for one of:
1244
1294
1245
1295
<ul class=brief>
1246
1296
<li> `<code> Set-Cookie</code> `
1247
1297
<li> `<code> Set-Cookie2</code> `
1248
1298
</ul>
1299
+ </div>
1249
1300
1250
1301
<p> A <dfn export>request-body-header name</dfn> is a <a for=/>header name</a> that is a
1251
1302
<a>byte-case-insensitive</a> match for one of:
0 commit comments