|
7 | 7 |
|
8 | 8 | <p><a class="logo" href="https://whatwg.org/"><img alt="WHATWG" height="100" src="https://resources.whatwg.org/logo-fetch.svg" width="100"></a> |
9 | 9 | <h1 id="cors">Fetch</h1> |
10 | | -<h2 class="no-num no-toc" id="living-standard-—-last-updated-27-january-2016">Living Standard — Last Updated 27 January 2016</h2> |
| 10 | +<h2 class="no-num no-toc" id="living-standard-—-last-updated-28-january-2016">Living Standard — Last Updated 28 January 2016</h2> |
11 | 11 |
|
12 | 12 | <dl> |
13 | 13 | <dt>Participate: |
@@ -386,6 +386,13 @@ <h4 id="terminology-headers"><span class="secno">3.1.2 </span>Headers</h4> |
386 | 386 | <a href="#concept-header-value" title="concept-header-value">value</a>, remove any leading and trailing |
387 | 387 | <a href="#http-whitespace-bytes">HTTP whitespace bytes</a> from it. |
388 | 388 |
|
| 389 | +<p>A <dfn id="concept-header-value-combined" title="concept-header-value-combined">combined value</dfn>, given a |
| 390 | +<a href="#concept-header-name" title="concept-header-name">name</a> (<var>name</var>) and |
| 391 | +<a href="#concept-header-list" title="concept-header-list">header list</a> (<var>list</var>), is the |
| 392 | +<a href="#concept-header-value" title="concept-header-value">values</a> of all <a href="#concept-header" title="concept-header">headers</a> in |
| 393 | +<var>list</var> whose <a href="#concept-header-name" title="concept-header-name">name</a> is <var>name</var>, separated from |
| 394 | +each other by `<code title="">,</code>`, in order. |
| 395 | + |
389 | 396 | <hr> |
390 | 397 |
|
391 | 398 | <p>A <dfn id="simple-header">simple header</dfn> is a <a href="#concept-header" title="concept-header">header</a> whose |
@@ -3208,7 +3215,6 @@ <h3 id="headers-class"><span class="secno">6.1 </span>Headers class</h3> |
3208 | 3215 | void <a href="#dom-headers-append" title="dom-Headers-append">append</a>(ByteString <var>name</var>, ByteString <var>value</var>); |
3209 | 3216 | void <a href="#dom-headers-delete" title="dom-Headers-delete">delete</a>(ByteString <var>name</var>); |
3210 | 3217 | ByteString? <a href="#dom-headers-get" title="dom-Headers-get">get</a>(ByteString <var>name</var>); |
3211 | | - sequence<ByteString> <a href="#dom-headers-getall" title="dom-Headers-getAll">getAll</a>(ByteString <var>name</var>); |
3212 | 3218 | boolean <a href="#dom-headers-has" title="dom-Headers-has">has</a>(ByteString <var>name</var>); |
3213 | 3219 | void <a href="#dom-headers-set" title="dom-Headers-set">set</a>(ByteString <var>name</var>, ByteString <var>value</var>); |
3214 | 3220 | iterable<ByteString, ByteString>; |
@@ -3356,24 +3362,12 @@ <h3 id="headers-class"><span class="secno">6.1 </span>Headers class</h3> |
3356 | 3362 | <li><p>If <var>name</var> is not a <a href="#concept-header-name" title="concept-header-name">name</a>, |
3357 | 3363 | <a class="external" data-anolis-spec="webidl" href="https://heycam.github.io/webidl/#dfn-throw">throw</a> a <code title="">TypeError</code>. |
3358 | 3364 |
|
3359 | | - <li><p>Return the <a href="#concept-header-value" title="concept-header-value">value</a> of the first |
3360 | | - <a href="#concept-header" title="concept-header">header</a> in |
| 3365 | + <li><p>If there is <em>no</em> <a href="#concept-header" title="concept-header">header</a> in |
3361 | 3366 | <a href="#concept-headers-header-list" title="concept-Headers-header-list">header list</a> whose |
3362 | | - <a href="#concept-header-name" title="concept-header-name">name</a> is <var>name</var>, and null otherwise. |
3363 | | -</ol> |
3364 | | - |
3365 | | -<p>The <dfn id="dom-headers-getall" title="dom-Headers-getAll"><code>getAll(<var>name</var>)</code></dfn> method, |
3366 | | -when invoked, must run these steps: |
3367 | | - |
3368 | | -<ol> |
3369 | | - <li><p>If <var>name</var> is not a <a href="#concept-header-name" title="concept-header-name">name</a>, |
3370 | | - <a class="external" data-anolis-spec="webidl" href="https://heycam.github.io/webidl/#dfn-throw">throw</a> a <code title="">TypeError</code>. |
| 3367 | + <a href="#concept-header-name" title="concept-header-name">name</a> is <var>name</var>, return null. |
3371 | 3368 |
|
3372 | | - <li><p>Return the <a href="#concept-header-value" title="concept-header-value">values</a> of all |
3373 | | - <a href="#concept-header" title="concept-header">headers</a> in |
3374 | | - <a href="#concept-headers-header-list" title="concept-Headers-header-list">header list</a> whose |
3375 | | - <a href="#concept-header-name" title="concept-header-name">name</a> is <var>name</var>, in list order, and |
3376 | | - the empty sequence otherwise. |
| 3369 | + <li><p>Return the <a href="#concept-header-value-combined" title="concept-header-value-combined">combined value</a> given |
| 3370 | + <var>name</var> and <a href="#concept-headers-header-list" title="concept-Headers-header-list">header list</a>. |
3377 | 3371 | </ol> |
3378 | 3372 |
|
3379 | 3373 | <p>The <dfn id="dom-headers-has" title="dom-Headers-has"><code>has(<var>name</var>)</code></dfn> method, |
@@ -3421,11 +3415,33 @@ <h3 id="headers-class"><span class="secno">6.1 </span>Headers class</h3> |
3421 | 3415 | <a href="#concept-headers-header-list" title="concept-Headers-header-list">header list</a>. |
3422 | 3416 | </ol> |
3423 | 3417 |
|
3424 | | -<p>The <a class="external" data-anolis-spec="webidl" href="https://heycam.github.io/webidl/#dfn-value-pairs-to-iterate-over">value pairs to iterate over</a> are the |
3425 | | -<a href="#concept-header" title="concept-header">headers</a> in the |
3426 | | -<a href="#concept-headers-header-list" title="concept-Headers-header-list">header list</a> with the key being the |
3427 | | -<a href="#concept-header-name" title="concept-header-name">name</a> and value the |
3428 | | -<a href="#concept-header-value" title="concept-header-value">value</a>. |
| 3418 | +<p>The <a class="external" data-anolis-spec="webidl" href="https://heycam.github.io/webidl/#dfn-value-pairs-to-iterate-over">value pairs to iterate over</a> are the return value of |
| 3419 | +running these steps: |
| 3420 | + |
| 3421 | +<ol> |
| 3422 | + <li><p>Let <var>headers</var> be an empty list of |
| 3423 | + <a href="#concept-header-name" title="concept-header-name">name</a>-<a href="#concept-header-value" title="concept-header-value">value</a> pairs |
| 3424 | + with the key being the <a href="#concept-header-name" title="concept-header-name">name</a> and value the |
| 3425 | + <a href="#concept-header-value" title="concept-header-value">value</a>. |
| 3426 | + |
| 3427 | + <li><p>Let <var>names</var> be all the <a href="#concept-header-name" title="concept-header-name">names</a> of the |
| 3428 | + <a href="#concept-header" title="concept-header">headers</a> in the |
| 3429 | + <a href="#concept-headers-header-list" title="concept-Headers-header-list">header list</a>, with duplicates removed, and sorted |
| 3430 | + lexicographically. |
| 3431 | + |
| 3432 | + <li> |
| 3433 | + <p>For each <var>name</var> in <var>names</var>, run these substeps: |
| 3434 | + |
| 3435 | + <ol> |
| 3436 | + <li><p>Let <var>value</var> be the |
| 3437 | + <a href="#concept-header-value-combined" title="concept-header-value-combined">combined value</a> given <var>name</var> and |
| 3438 | + <a href="#concept-headers-header-list" title="concept-Headers-header-list">header list</a>. |
| 3439 | + |
| 3440 | + <li><p>Append <var>name</var>-<var>value</var> to <var>headers</var>. |
| 3441 | + </ol> |
| 3442 | + |
| 3443 | + <li><p>Return <var>headers</var> |
| 3444 | +</ol> |
3429 | 3445 |
|
3430 | 3446 |
|
3431 | 3447 | <h3 id="body-mixin"><span class="secno">6.2 </span>Body mixin</h3> |
|
0 commit comments