Skip to content

Return a content-encoding header for resource timing and more #1796

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions fetch.bs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,8 @@ following <a for=struct>items</a>: [[RESOURCE-TIMING]] [[NAVIGATION-TIMING]]
<dd>A number.
<dt><dfn export for="response body info">content type</dfn> (default the empty string)
<dd>An <a for=/>ASCII string</a>.
<dt><dfn export for="response body info">content encoding</dfn> (default the empty string)
<dd>An <a for=/>ASCII string</a>.
</dl>

<div algorithm>
Expand Down Expand Up @@ -6319,6 +6321,23 @@ optional boolean <var>forceNewConnection</var> (default false), run these steps:
<li><p>Let <var>codings</var> be the result of <a>extracting header list values</a> given
`<code>Content-Encoding</code>` and <var>response</var>'s <a for=response>header list</a>.

<li><p>Let <var>filteredCoding</var> be "<code>_</code>".

<li><p>If <var>codings</var> is null, then set <var>filteredCoding</var> to the empty string.

<li><p>Otherwise, if <var>codings</var>'s <a for=list>size</a> is greater than 1, then set
<var>filteredCoding</var> to "<code>multiple</code>".

<li><p>Otherwise, if <var>codings</var>[0] is the empty string, or it is supported by the user agent,
and is a <a>byte-case-insensitive</a> match for an entry listed in the
<a href="https://www.iana.org/assignments/http-parameters/http-parameters.xhtml#content-coding">
<cite>HTTP Content Coding Registry</cite></a> of [[!IANA-HTTP-PARAMS]], then set
<var>filteredCoding</var> to the result of <a lt=byte-lowercased>byte-lowercasing</a>
<var>codings</var>[0].

<li><p>Set <var>response</var>'s <a for=response>body info</a>'s
<a for="response body info">content encoding</a> to <var>filteredCoding</var>.

<li><p>Increase <var>response</var>'s <a for=response>body info</a>'s
<a for="response body info">encoded size</a> by <var>bytes</var>'s
<a for="byte sequence">length</a>.
Expand Down Expand Up @@ -9128,6 +9147,7 @@ Gavin Carothers,
Glenn Maynard,
Graham Klyne,
Gregory Terzian,
Guohui Deng(邓国辉)<!-- guohuideng2024; GitHub -->,
Hal Lockhart,
Hallvord R. M. Steen,
Harris Hancock,
Expand Down