Skip to content

Commit ab946e6

Browse files
shs96candreastt
authored andcommitted
ensure response body is utf-8 encoded (#1404)
As currently worded, the response's value may be double JSON-encoded, which is far from ideal. We also fail to state that the bytes must be UTF-8 encoded.
1 parent 4280c91 commit ab946e6

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

index.html

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -582,9 +582,10 @@ <h3>Processing model</h3>
582582
<dd>"<code>no-cache</code>"
583583
</dl>
584584

585-
<li><p>Let <var>response</var>’s <a>body</a> be a JSON <a>Object</a>
586-
with a key "<code>value</code>"
587-
set to the <a>JSON serialization</a> of <var>data</var>.
585+
<li><p>Let <var>response</var>’s <a>body</a> be
586+
the <a data-lt="utf-8 encode">UTF-8 encoded</a> <a>JSON
587+
serialization</a> of a JSON <a>Object</a> with a key
588+
"<code>value</code>" set to <var>data</var>.
588589

589590
<li><p>Let <var>response bytes</var> be the byte sequence resulting
590591
from serializing <var>response</var> according to the rules in [[!RFC7230]].
@@ -9359,6 +9360,12 @@ <h2>Index</h2>
93599360
<!-- undefined --> <li><dfn><a href=https://www.ecma-international.org/ecma-262/5.1/#sec-4.3.9>Undefined</a></dfn>
93609361
</ul>
93619362

9363+
<dt>Encoding
9364+
<dd><p>The following terms are defined in the WHATWG Encoding specification: [[!ENCODING]]
9365+
<ul>
9366+
<!-- UTF-8 Encode --> <li><dfn><a href="https://encoding.spec.whatwg.org/#utf-8-encode">UTF-8 Encode</a></dfn>
9367+
</ul>
9368+
93629369
<dt>Fetch
93639370
<dd><p>The following terms are defined in the WHATWG Fetch specification: [[!FETCH]]
93649371
<ul>

0 commit comments

Comments
 (0)