Skip to content

Commit

Permalink
Fix a number of issues:
Browse files Browse the repository at this point in the history
1) formatting;
2) "gzip, GZIP" is ok for they case-insensitive match.
3) there is a mistake saying that the "contentEncoding" consists of
digits;
4) no longer returns "contentEncoding" for data url.
  • Loading branch information
Guohui Deng committed Jan 21, 2025
1 parent c8a0981 commit a007614
Showing 1 changed file with 10 additions and 22 deletions.
32 changes: 10 additions & 22 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3973,12 +3973,10 @@ extract an encoding type</dfn> from a <a for=/>header list</a> <var>headers</var
<li><p>If <var>candidateValue</var> is null, then set <var>candidateValue</var> to
<var>value</var>.

<li><p>Otherwise, if <var>value</var> is not <var>candidateValue</var>, return failure.
<li><p>Otherwise, if <var>value</var> is not an <a>ASCII case-insensitive</a> match for
<var>candidateValue</var>, return failure.
</ol>

<li><p>If <var>candidateValue</var> is the empty string or has a <a for=/>code point</a> that is
not an <a for=/>ASCII digit</a>, then return null.

<li><p>Return <var>candidateValue</var>, interpreted as a string.
</ol>
</div>
Expand Down Expand Up @@ -5047,12 +5045,12 @@ steps:

<li><p>Let <var>coding</var> be the empty string.

<li><p>Let <var>accept-coding</var> be the result of <a for="header list">getting</a>
`<code>Accept-Encoding</code>` from <var>request</var>'s <a for=request>header list</a>.
If <var>accept-encoding</var> is not null and the server selects one of the encoding options,
set <var>coding</var> to the selected encoding option; otherwise, i.e., no encoding is used,
set <var>coding</var> to <a href=https://httpwg.org/specs/rfc9110.html#field.accept-encoding>
<code>"identity"</code></a>.
<li><p>Let <var>accept-encoding</var> be the result of <a for="header list">getting</a>
`<code>Accept-Encoding</code>` from <var>request</var>'s <a for=request>header list</a>.
If <var>accept-encoding</var> is not null and the server selects one of the encoding options,
set <var>coding</var> to the selected encoding option; otherwise, i.e., no encoding is used,
set <var>coding</var> to <a href=https://httpwg.org/specs/rfc9110.html#field.accept-encoding>
<code>"identity"</code></a>.

<li>
<p>If <var>request</var>'s <a for=request>header list</a>
Expand Down Expand Up @@ -5158,20 +5156,10 @@ steps:
<li><p>Let <var>mimeType</var> be <var>dataURLStruct</var>'s
<a for="data: URL struct">MIME type</a>, <a lt="serialize a MIME type to bytes">serialized</a>.

<li><p>Let <var>coding</var> be the empty string.

<li><p>Let <var>accept-coding</var> be the result of <a for="header list">getting</a>
`<code>Accept-Encoding</code>` from <var>request</var>'s <a for=request>header list</a>.
If <var>accept-encoding</var> is not null and the server selects one of the encoding options,
set <var>coding</var> to the selected encoding option; otherwise, i.e., no encoding is used,
set <var>coding</var> to <a href=https://httpwg.org/specs/rfc9110.html#field.accept-encoding>
<code>"identity"</code></a>.

<li><p>Return a new <a for=/>response</a> whose <a for=response>status message</a> is
`<code>OK</code>`, <a for=response>header list</a> is « (`<code>Content-Type</code>`,
<var>mimeType</var>), (`<code>Content-Encoding</code>`, <var>coding</var>) », and
<a for=response>body</a> is <var>dataURLStruct</var>'s <a for="data: URL struct">
body</a> <a for="byte sequence">as a body</a>.
<var>mimeType</var>) », and <a for=response>body</a> is <var>dataURLStruct</var>'s
<a for="data: URL struct">body</a> <a for="byte sequence">as a body</a>.

</ol>

Expand Down

0 comments on commit a007614

Please sign in to comment.