Skip to content

Commit 93b4349

Browse files
committed
Remove trailer support
As noted in #772 (comment) the current way it is exposed subsets what HTTP supports and therefore does not feel like a good starting point. Both for the internal and public API. Additionally, the public-facing API has not seen interest from implementers, at least for the past year and a half.
1 parent 9dd5319 commit 93b4349

File tree

1 file changed

+8
-81
lines changed

1 file changed

+8
-81
lines changed

fetch.bs

Lines changed: 8 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1764,14 +1764,6 @@ message as HTTP/2 does not support them.
17641764
<dfn export for=response id=concept-response-body>body</dfn> (null or a
17651765
<a for=/>body</a>). Unless stated otherwise it is null.
17661766

1767-
<p>A <a for=/>response</a> has an associated
1768-
<dfn export for=response id=concept-response-trailer>trailer</dfn> (a
1769-
<a for=/>header list</a>). Unless stated otherwise it is empty.
1770-
1771-
<p>A <a for=/>response</a> has an associated
1772-
<dfn export for=response id=concept-response-trailer-failed>trailer failed flag</dfn>, which is
1773-
initially unset.
1774-
17751767
<p>A <a for=/>response</a> has an associated
17761768
<dfn export for=response id=concept-response-cache-state>cache state</dfn> (the empty string or
17771769
"<code>local</code>"). Unlesss stated otherwise, it is the empty string.
@@ -1842,9 +1834,8 @@ known as an <dfn export id=concept-aborted-network-error>aborted network error</
18421834
<a for=/>response</a> whose
18431835
<a for=response>status</a> is always <code>0</code>,
18441836
<a for=response>status message</a> is always the empty byte sequence,
1845-
<a for=response>header list</a> is always empty,
1846-
<a for=response>body</a> is always null, and
1847-
<a for=response>trailer</a> is always empty.
1837+
<a for=response>header list</a> is always empty, and
1838+
<a for=response>body</a> is always null.
18481839

18491840
<hr>
18501841

@@ -1873,36 +1864,33 @@ which is only "accessible" to internal specification algorithms and is never a
18731864

18741865
<p>A <dfn export id=concept-filtered-response-cors>CORS filtered response</dfn> is a
18751866
<a>filtered response</a> whose
1876-
<a for=response>type</a> is "<code>cors</code>",
1867+
<a for=response>type</a> is "<code>cors</code>" and
18771868
<a for=response>header list</a> excludes any
18781869
<a for=/>headers</a> in
18791870
<a for=internal>internal response</a>'s
18801871
<a for=response>header list</a> whose
18811872
<a for=header>name</a> is <em>not</em> a
18821873
<a>CORS-safelisted response-header name</a>, given
18831874
<a for=internal>internal response</a>'s
1884-
<a for=response>CORS-exposed header-name list</a>, and
1885-
<a for=response>trailer</a> is empty.
1875+
<a for=response>CORS-exposed header-name list</a>.
18861876

18871877
<p>An <dfn export id=concept-filtered-response-opaque>opaque filtered response</dfn> is a
18881878
<a>filtered response</a> whose
18891879
<a for=response>type</a> is "<code>opaque</code>",
18901880
<a for=response>URL list</a> is the empty list,
18911881
<a for=response>status</a> is <code>0</code>,
18921882
<a for=response>status message</a> is the empty byte sequence,
1893-
<a for=response>header list</a> is empty,
1894-
<a for=response>body</a> is null, and
1895-
<a for=response>trailer</a> is empty.
1883+
<a for=response>header list</a> is empty, and
1884+
<a for=response>body</a> is null.
18961885

18971886
<p>An
18981887
<dfn export id=concept-filtered-response-opaque-redirect>opaque-redirect filtered response</dfn>
18991888
is a <a>filtered response</a> whose
19001889
<a for=response>type</a> is "<code>opaqueredirect</code>",
19011890
<a for=response>status</a> is <code>0</code>,
19021891
<a for=response>status message</a> is the empty byte sequence,
1903-
<a for=response>header list</a> is empty,
1904-
<a for=response>body</a> is null, and
1905-
<a for=response>trailer</a> is empty.
1892+
<a for=response>header list</a> is empty, and
1893+
<a for=response>body</a> is null.
19061894

19071895
<div class="note no-backref">
19081896
<p>Exposing the <a for=response>URL list</a> for
@@ -3649,14 +3637,6 @@ optionally with a <i>recursive flag</i>, run these steps:
36493637
<li><p><a>Queue a fetch task</a> on <var>request</var> to
36503638
<a>process response end-of-body</a> for <var>response</var>.
36513639

3652-
<li><p>Wait for either <var>internalResponse</var>'s <a for=response>trailer</a>,
3653-
if any, or for the ongoing fetch to <a for=fetch lt=terminated>terminate</a>. <span class=note>See
3654-
<a href=https://tools.ietf.org/html/rfc7230#section-4.1.2>section 4.1.2</a> of
3655-
[[!HTTP]].</span>
3656-
3657-
<li><p>If the ongoing fetch is <a for=fetch>terminated</a>, then set <var>internalResponse</var>'s
3658-
<a for=response>trailer failed flag</a>.
3659-
36603640
<li><p>Set <var>request</var>'s <a>done flag</a>.
36613641

36623642
<li><p><a>Queue a fetch task</a> on <var>request</var> to <a>process response done</a>
@@ -6396,7 +6376,6 @@ interface Response {
63966376
readonly attribute boolean ok;
63976377
readonly attribute ByteString statusText;
63986378
[SameObject] readonly attribute Headers headers;
6399-
readonly attribute Promise&lt;Headers> trailer;
64006379

64016380
[NewObject] Response clone();
64026381
};
@@ -6418,10 +6397,6 @@ enum ResponseType { "basic", "cors", "default", "error", "opaque", "opaqueredire
64186397
<p>A {{Response}} object also has an associated <dfn for=Response export>headers</dfn> (null or a
64196398
{{Headers}} object), initially null.
64206399

6421-
<p>A {{Response}} object also has an associated
6422-
<dfn id=concept-response-trailer-promise for=Response>trailer promise</dfn> (a promise). <span class=note>Used
6423-
for the {{Response/trailer}} attribute.</span>
6424-
64256400
<p>A {{Response}} object's <a for=Body>body</a> is its
64266401
<a for=Response>response</a>'s <a for=response>body</a>.
64276402

@@ -6484,10 +6459,6 @@ constructor, when invoked, must run these steps:
64846459
<a>current settings object</a>'s
64856460
<a for="environment settings object">HTTPS state</a>.
64866461

6487-
<li><p>Resolve <var>r</var>'s <a for=Response>trailer promise</a>
6488-
with a new {{Headers}} object whose <a for=Headers>guard</a> is
6489-
"<code>immutable</code>".
6490-
64916462
<li><p>Return <var>r</var>.
64926463
</ol>
64936464

@@ -6566,9 +6537,6 @@ must return the <a>context object</a>'s <a for=Response>response</a>'s
65666537
<p>The <dfn attribute for=Response><code>headers</code></dfn> attribute's getter, when invoked, must
65676538
return the <a>context object</a>'s <a for=Response>headers</a>.
65686539

6569-
<p>The <dfn attribute for=Response><code>trailer</code></dfn> attribute's getter, when invoked, must
6570-
return the <a>context object</a>'s <a for=Response>trailer promise</a>.
6571-
65726540
<hr>
65736541

65746542
<p>The <dfn method for=Response><code>clone()</code></dfn> method, when invoked, must
@@ -6591,11 +6559,6 @@ run these steps:
65916559
<a for=Headers>header list</a>, and <a for=Headers>guard</a> is the <a>context object</a>'s
65926560
<a for=Response>headers</a>'s <a for=Headers>guard</a>.
65936561

6594-
<li><p>Upon fulfillment of the <a>context object</a>'s <a for=Response>trailer promise</a>, resolve
6595-
<var>clonedResponseObject</var>'s <a for=Response>trailer promise</a> with a new {{Headers}} object
6596-
whose <a for=Headers>guard</a> is "<code>immutable</code>", and whose
6597-
<a for="Headers">header list</a> is <var>clonedResponse</var>'s <a for=response>trailer</a>.
6598-
65996562
<li><p>Return <var>clonedResponseObject</var>.
66006563

66016564
<li><p>Return <var>clonedResponse</var>.
@@ -6682,36 +6645,6 @@ method, must run these steps:
66826645
<li><p>Resolve <var>p</var> with <var>responseObject</var>.
66836646
</ol>
66846647

6685-
<p>To <a>process response done</a> for <var>response</var>, run these substeps:
6686-
6687-
<ol>
6688-
<li><p>If <var>locallyAborted</var> is true, terminate these substeps.
6689-
6690-
<li><p>Let <var>trailerObject</var> be a new {{Headers}} object whose
6691-
<a for=Headers>guard</a> is "<code>immutable</code>".
6692-
6693-
<li>
6694-
<p>If <var>response</var>'s <a for=response>trailer failed flag</a> is set, then:
6695-
6696-
<ol>
6697-
<li><p>If <var>response</var>'s <a for=response>aborted flag</a> is set, reject
6698-
<var>responseObject</var>'s <a for=Response>trailer promise</a> with an
6699-
"<code><a exception>AbortError</a></code>" {{DOMException}}.
6700-
6701-
<li><p>Otherwise, reject <var>responseObject</var>'s <a for=Response>trailer promise</a> with
6702-
a {{TypeError}}.
6703-
6704-
<li><p>Terminate these substeps.
6705-
</ol>
6706-
6707-
<li><p>Associate <var>trailerObject</var> with <var>response</var>'s
6708-
<a for=response>trailer</a>.
6709-
6710-
<li><p>Resolve <var>responseObject</var>'s
6711-
<a for=Response>trailer promise</a> with
6712-
<var>trailerObject</var>.
6713-
</ol>
6714-
67156648
<li><p>Return <var>p</var>.
67166649
</ol>
67176650

@@ -6732,12 +6665,6 @@ method, must run these steps:
67326665

67336666
<li><p>If <var>responseObject</var> is null, then return.
67346667

6735-
<li>
6736-
<p>Reject <var>responseObject</var>'s <a for=Response>trailer promise</a> with <var>error</var>.
6737-
6738-
<p class=note>This is a no-op if <var>responseObject</var>'s <a for=Response>trailer promise</a>
6739-
has already fulfilled.
6740-
67416668
<li><p>Let <var>response</var> be <var>responseObject</var>'s <a for=Response>response</a>.
67426669

67436670
<li><p>If <var>response</var>'s <a for=response>body</a> is not null and is

0 commit comments

Comments
 (0)