From 0bb26cc2445243fa8afd88c576fb7e1d1c39c96c Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Tue, 30 Oct 2018 16:23:33 +0100 Subject: [PATCH] Limit Content-Type overrides to when charset isn't already UTF-8 This will help web compatibility and address all cases linked from https://github.com/whatwg/mimesniff/issues/84. Tests: https://github.com/web-platform-tests/wpt/pull/13779. --- xhr.bs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xhr.bs b/xhr.bs index 98fe73c..c315786 100644 --- a/xhr.bs +++ b/xhr.bs @@ -723,8 +723,10 @@ method must run these steps: parsing originalAuthorContentType.
  • -

    If contentTypeRecord is not failure, and contentTypeRecord's - parameters["charset"] exists, then: +

    If contentTypeRecord is not failure, contentTypeRecord's + parameters["charset"] exists, and + parameters["charset"] is not an + ASCII case-insensitive match for "UTF-8", then:

    1. Set contentTypeRecord's