Skip to content

Commit dc2b573

Browse files
Add more about content-encoding
And some corrections.
1 parent 2c939cb commit dc2b573

File tree

1 file changed

+37
-7
lines changed

1 file changed

+37
-7
lines changed

fetch.bs

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,6 @@ a <a>byte-case-insensitive</a> match for one of
11341134
<li>`<code>Content-Language</code>`
11351135
<li>`<code>Content-Length</code>`
11361136
<li>`<code>Content-Type</code>`
1137-
<li>`<code>Content-Encoding</code>`
11381137
<li>`<code>Expires</code>`
11391138
<li>`<code>Last-Modified</code>`
11401139
<li>`<code>Pragma</code>`
@@ -1150,7 +1149,6 @@ is a <a>byte-case-insensitive</a> match for one of
11501149
<li>`<code>Accept-Language</code>`
11511150
<li>`<code>Content-Language</code>`
11521151
<li>`<code>Content-Type</code>`
1153-
<li>`<code>Content-Encoding</code>`
11541152
</ul>
11551153

11561154
<div algorithm>
@@ -1180,6 +1178,7 @@ is a <a>byte-case-insensitive</a> match for one of
11801178
<li>`<a http-header><code>Access-Control-Request-Headers</code></a>`
11811179
<li>`<a http-header><code>Access-Control-Request-Method</code></a>`
11821180
<li>`<code>Connection</code>`
1181+
<li>`<code>Content-Encoding</code>`
11831182
<li>`<code>Content-Length</code>`
11841183
<li>`<code>Cookie</code>`
11851184
<li>`<code>Cookie2</code>`
@@ -5042,6 +5041,12 @@ steps:
50425041

50435042
<li><p>Let <var>type</var> be <var>blob</var>'s {{Blob/type}}.
50445043

5044+
<li><p>Let <var>accept-coding</var> be the result of <a for="header list">getting</a>
5045+
`<code>Content-Encoding</code>` from <var>request</var>'s <a for=request>header list</a>.
5046+
If <var>accept-encoding</var> is not null and the server selects one of the encoding options,
5047+
let <var>coding</var> be the selected encoding option; otherwise, i.e., let <var>coding</var>
5048+
be null.
5049+
50455050
<li>
50465051
<p>If <var>request</var>'s <a for=request>header list</a>
50475052
<a for="header list">does not contain</a> `<code>Range</code>`:
@@ -5058,6 +5063,10 @@ steps:
50585063
<li><p>Set <var>response</var>'s <a for=response>header list</a> to «
50595064
(`<code>Content-Length</code>`, <var>serializedFullLength</var>),
50605065
(`<code>Content-Type</code>`, <var>type</var>) ».
5066+
5067+
<li><p>If <var>coding</var> is non-null,<a for="header list"> append</a> (`<code>Content-Encoding</code>`,
5068+
<var>coding</var>) to <var>response</var>'s <a for=response>header list</a>.
5069+
50615070
</ol>
50625071

50635072
<li>
@@ -5127,6 +5136,9 @@ steps:
51275136
(`<code>Content-Length</code>`, <var>serializedSlicedLength</var>),
51285137
(`<code>Content-Type</code>`, <var>type</var>), (`<code>Content-Range</code>`,
51295138
<var>contentRange</var>) ».
5139+
5140+
<li><p>If <var>coding</var> is non-null,<a for="header list"> append</a> (`<code>Content-Encoding</code>`,
5141+
<var>coding</var>) to <var>response</var>'s <a for=response>header list</a>.
51305142
</ol>
51315143

51325144
<li><p>Return <var>response</var>.
@@ -5143,10 +5155,28 @@ steps:
51435155
<li><p>Let <var>mimeType</var> be <var>dataURLStruct</var>'s
51445156
<a for="data: URL struct">MIME type</a>, <a lt="serialize a MIME type to bytes">serialized</a>.
51455157

5146-
<li><p>Return a new <a for=/>response</a> whose <a for=response>status message</a> is
5147-
`<code>OK</code>`, <a for=response>header list</a> is « (`<code>Content-Type</code>`,
5148-
<var>mimeType</var>) », and <a for=response>body</a> is <var>dataURLStruct</var>'s
5149-
<a for="data: URL struct">body</a> <a for="byte sequence">as a body</a>.
5158+
<li><p>Let <var>accept-coding</var> be the result of <a for="header list">getting</a>
5159+
`<code>Content-Encoding</code>` from <var>request</var>'s <a for=request>header list</a>.
5160+
If <var>accept-encoding</var> is not null and the server selects one of the encoding options,
5161+
let <var>coding</var> be the selected encoding option; otherwise, i.e., let <var>coding</var>
5162+
be null.
5163+
<li><p>Let <var>response</var> be a new <a for=/>response</a>.
5164+
5165+
<li><p>Set <var>response</var>'s <a for=response>status message</a> to
5166+
<code>OK</code>`.
5167+
5168+
<li><p>Set <var>response</var>'s <a for=response>header list</a> to «
5169+
(`<code>Content-Type</code>`, <var>mimeType</var>)».
5170+
5171+
<li><p>If <var>coding</var> is non-null,<a for="header list"> append</a>
5172+
(`<code>Content-Encoding</code>`, <var>coding</var>) to <var>response</var>'s
5173+
<a for=response>header list</a>.
5174+
5175+
<li><p>Set <var>response</var>'s <a for=response>body</a> to <var>dataURLStruct</var>'s
5176+
<a for="data: URL struct">body</a>
5177+
5178+
<li><p>Return <var>response</var>.
5179+
51505180
</ol>
51515181

51525182
<dt>"<code>file</code>"
@@ -9165,7 +9195,7 @@ Gavin Carothers,
91659195
Glenn Maynard,
91669196
Graham Klyne,
91679197
Gregory Terzian,
9168-
Guohui Deng,
9198+
Guohui Deng(邓国辉)<!-- guohuideng2024; GitHub -->,
91699199
Hal Lockhart,
91709200
Hallvord R. M. Steen,
91719201
Harris Hancock,

0 commit comments

Comments
 (0)