Skip to content

Commit

Permalink
Limit Content-Type overrides to when charset isn't already UTF-8
Browse files Browse the repository at this point in the history
This will help web compatibility and address all cases linked from whatwg/mimesniff#84.

Tests: web-platform-tests/wpt#13779.
  • Loading branch information
annevk committed Oct 30, 2018
1 parent 7d8526b commit 721f3c9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions xhr.bs
Original file line number Diff line number Diff line change
Expand Up @@ -723,8 +723,10 @@ method must run these steps:
<a lt="parse a MIME type from bytes">parsing</a> <var>originalAuthorContentType</var>.

<li>
<p>If <var>contentTypeRecord</var> is not failure, and <var>contentTypeRecord</var>'s
<a for="MIME type">parameters</a>["<code>charset</code>"] <a for=map>exists</a>, then:
<p>If <var>contentTypeRecord</var> is not failure, <var>contentTypeRecord</var>'s
<a for="MIME type">parameters</a>["<code>charset</code>"] <a for=map>exists</a>, and
<a for="MIME type">parameters</a>["<code>charset</code>"] is not an
<a>ASCII case-insensitive</a> match for "<code>UTF-8</code>", then:

<ol>
<li><p><a for=map>Set</a> <var>contentTypeRecord</var>'s
Expand Down

0 comments on commit 721f3c9

Please sign in to comment.