@@ -300,6 +300,16 @@ specialized multimap. An ordered list of key-value pairs with potentially duplic
300
300
(<var> name</var> ) if <var> list</var> <a for=list>contains</a> a <a for=/>header</a> whose
301
301
<a for=header>name</a> is a <a>byte-case-insensitive</a> match for <var> name</var> .
302
302
303
+ <p> To <dfn export for="header list" id=concept-header-list-get>get</dfn> a <a for=header>name</a>
304
+ <var> name</var> from a <a for=/>header list</a> <var> list</var> , run these steps:
305
+
306
+ <ol>
307
+ <li><p> If <var> list</var> <a for="header list">does not contain</a> <var> name</var> , then return
308
+ null.
309
+
310
+ <li><p> Return the <a for="header">combined value</a> with <var> name</var> and <var> list</var> .
311
+ </ol>
312
+
303
313
<p> To <dfn export for="header list" id=concept-header-list-append>append</dfn> a
304
314
<a for=header>name</a> /<a for=header>value</a> (<var> name</var> /<var> value</var> ) pair to a
305
315
<a for=/>header list</a> (<var> list</var> ), run these steps:
@@ -368,7 +378,7 @@ a <a for=/>header list</a> (<var>list</var>), run these steps:
368
378
<p> <a for=list>For each</a> <var> name</var> in <var> names</var> :
369
379
370
380
<ol>
371
- <li><p> Let <var> value</var> be the <a for=header>combined value</a> given <var> name</var> and
381
+ <li><p> Let <var> value</var> be the <a for=header>combined value</a> with <var> name</var> and
372
382
<var> list</var> .
373
383
374
384
<li><p> <a for=list>Append</a> <var> name</var> -<var> value</var> to <var> headers</var> .
@@ -2498,7 +2508,32 @@ response <a for=/>header</a> can be used to require checking of a <a for=/>respo
2498
2508
`<code> Content-Type</code> ` <a for=/>header</a> against the <a for=request>destination</a> of a
2499
2509
<a for=/>request</a> .
2500
2510
2501
- <p> Its <a for=header>value</a> <a>ABNF</a> :
2511
+ <p> To <dfn>determine nosniff</dfn> , given a <a for=/>header list</a> <var> list</var> , run these
2512
+ steps:
2513
+
2514
+ <ol>
2515
+ <li><p> Let <var> value</var> be the result of <a for="header list">getting</a>
2516
+ `<a http-header><code>X-Content-Type-Options</code></a> ` from <var> list</var> .
2517
+
2518
+ <li><p> If <var> value</var> is null, then return false.
2519
+
2520
+ <li><p> Let <var> stringValue</var> be the <a>isomorphic encode</a> of <var> value</var> .
2521
+
2522
+ <li>
2523
+ <p> Let <var> tokens</var> be the result of
2524
+ <a lt="split on commas">Spliting <var>stringValue</var> on commas</a> .
2525
+
2526
+ <p class="note"> This intentionally strips U+000C FORM FEED, despite 0x0C not being being a
2527
+ <a>HTTP whitespace byte</a> .
2528
+
2529
+ <li><p> If <var> tokens</var> [0] is an <a>ASCII case-insensitive</a> match for
2530
+ "<code> nosniff</code> ", then return true.
2531
+
2532
+ <li><p> Return false.
2533
+ </ol>
2534
+
2535
+ <p> Web developers and conformance checkers must use the following <a for=header>value</a>
2536
+ <a>ABNF</a> for `<a http-header><code>X-Content-Type-Options</code></a> `:
2502
2537
2503
2538
<pre>
2504
2539
X-Content-Type-Options = "nosniff" ; case-insensitive</pre>
@@ -2510,16 +2545,8 @@ X-Content-Type-Options = "nosniff" ; case-insensitive</pre>
2510
2545
<p> Run these steps:
2511
2546
2512
2547
<ol>
2513
- <li><p> If <var> response</var> 's <a for=response>header list</a>
2514
- <a for="header list">does not contain</a> `<a http-header><code>X-Content-Type-Options</code></a> `,
2515
- then return <b> allowed</b> .
2516
-
2517
- <li><p> Let <var> nosniff</var> be the result of <a>extracting header values</a> from the
2518
- <em> first</em> <a for=/>header</a> whose <a for=header>name</a> is a <a>byte-case-insensitive</a>
2519
- match for `<a http-header><code>X-Content-Type-Options</code></a> ` in <var> response</var> 's
2520
- <a for=response>header list</a> .
2521
-
2522
- <li><p> If <var> nosniff</var> is failure, then return <b> allowed</b> .
2548
+ <li><p> If <a>determine nosniff</a> with <var> response</var> 's <a for=response>header list</a> is
2549
+ false, then return <b> allowed</b> .
2523
2550
2524
2551
<li><p> Let <var> mimeType</var> be the result of <a for="header list">extracting a MIME type</a>
2525
2552
from <var> response</var> 's <a for=response>header list</a> .
@@ -2578,14 +2605,10 @@ run these steps:</p>
2578
2605
<var> mimeType</var> (ignoring parameters) is a <a>CORB-protected MIME type</a> , then return
2579
2606
<b> blocked</b> .
2580
2607
2581
- <li><p> Let <var> nosniff</var> be the result of <a>extracting header values</a> from the
2582
- <em> first</em> <a for=/>header</a> whose <a for=header>name</a> is a <a>byte-case-insensitive</a>
2583
- match for `<a http-header><code>X-Content-Type-Options</code></a> ` in <var> response</var> 's
2584
- <a for=response>header list</a> .
2585
-
2586
2608
<li>
2587
- <p> If <var> nosniff</var> is not failure and <var> mimeType</var> (ignoring parameters) is a
2588
- <a>CORB-protected MIME type</a> or <code> text/plain</code> , then return <b> blocked</b> .
2609
+ <p> If <a>determine nosniff</a> with <var> response</var> 's <a for=response>header list</a> is true
2610
+ and <var> mimeType</var> (ignoring parameters) is a <a>CORB-protected MIME type</a> or
2611
+ <code> text/plain</code> , then return <b> blocked</b> .
2589
2612
2590
2613
<p class="note no-backref"> CORB only protects <code> text/plain</code> responses with a
2591
2614
`<code> X-Content-Type-Options: nosniff</code> ` header. Unfortunately, protecting such responses
@@ -4893,7 +4916,7 @@ invoked, must run these steps:
4893
4916
<li><p> If the <a>context object</a> 's <a for=Headers>header list</a>
4894
4917
<a for="header list">does not contain</a> <var> name</var> , then return null.
4895
4918
4896
- <li><p> Return the <a for=header>combined value</a> given <var> name</var> and the
4919
+ <li><p> Return the <a for=header>combined value</a> with <var> name</var> and the
4897
4920
<a>context object</a> 's <a for=Headers>header list</a> .
4898
4921
</ol>
4899
4922
0 commit comments