Skip to content

Commit d963159

Browse files
guohuideng2024pmeenan
authored andcommitted
Expose Content-Encoding header to Resource Timing
See w3c/resource-timing#381 for context. Corresponding Resource Timing PR: w3c/resource-timing#411.
1 parent a183c90 commit d963159

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

fetch.bs

100644100755
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,8 @@ following <a for=struct>items</a>: [[RESOURCE-TIMING]] [[NAVIGATION-TIMING]]
377377
<dd>A number.
378378
<dt><dfn export for="response body info">content type</dfn> (default the empty string)
379379
<dd>An <a for=/>ASCII string</a>.
380+
<dt><dfn export for="response body info">content encoding</dfn> (default the empty string)
381+
<dd>An <a for=/>ASCII string</a>.
380382
</dl>
381383

382384
<div algorithm>
@@ -6432,6 +6434,22 @@ optional boolean <var>forceNewConnection</var> (default false), run these steps:
64326434
<li><p>Let <var>codings</var> be the result of <a>extracting header list values</a> given
64336435
`<code>Content-Encoding</code>` and <var>response</var>'s <a for=response>header list</a>.
64346436

6437+
<li><p>Let <var>filteredCoding</var> be "<code>@unknown</code>".
6438+
6439+
<li><p>If <var>codings</var> is null or failure, then set <var>filteredCoding</var> to
6440+
the empty string.
6441+
6442+
<li><p>Otherwise, if <var>codings</var>'s <a for=list>size</a> is greater than 1, then set
6443+
<var>filteredCoding</var> to "<code>multiple</code>".
6444+
6445+
<li><p>Otherwise, if <var>codings</var>[0] is the empty string, or it is supported by the
6446+
user agent, and is a <a>byte-case-insensitive</a> match for an entry listed in the
6447+
<cite>HTTP Content Coding Registry</cite>, then set <var>filteredCoding</var> to the result
6448+
of <a lt=byte-lowercased>byte-lowercasing</a> <var>codings</var>[0]. [[!IANA-HTTP-PARAMS]]
6449+
6450+
<li><p>Set <var>response</var>'s <a for=response>body info</a>'s
6451+
<a for="response body info">content encoding</a> to <var>filteredCoding</var>.
6452+
64356453
<li><p>Increase <var>response</var>'s <a for=response>body info</a>'s
64366454
<a for="response body info">encoded size</a> by <var>bytes</var>'s
64376455
<a for="byte sequence">length</a>.
@@ -9241,6 +9259,7 @@ Gavin Carothers,
92419259
Glenn Maynard,
92429260
Graham Klyne,
92439261
Gregory Terzian,
9262+
Guohui Deng(邓国辉)<!-- guohuideng2024; GitHub -->,
92449263
Hal Lockhart,
92459264
Hallvord R. M. Steen,
92469265
Harris Hancock,

0 commit comments

Comments
 (0)