From 5fd30bdd33ba08296d678556f4b68864966b5fdf Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Tue, 16 Oct 2018 15:31:46 +0200 Subject: [PATCH] Use a more common serialization for MIME types This is a defense-in-depth for the issues that arised at https://github.com/whatwg/mimesniff/issues/84. In theory they are all solved by https://github.com/whatwg/xhr/pull/224, but given how quickly several sites turned up that relied on a space, it seems prudent to standardize on that serialization to avoid similar issues elsewhere. --- mimesniff.bs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mimesniff.bs b/mimesniff.bs index 5c773c9..7805725 100644 --- a/mimesniff.bs +++ b/mimesniff.bs @@ -322,7 +322,7 @@ a valid MIME type string that does not contain U+003B (;).

Given text/html;charset="shift_jis"iso-2022-jp you end up with - text/html;charset=shift_jis. + text/html; charset=shift_jis.

  • @@ -385,7 +385,7 @@ these steps: parameters:
      -
    1. Append U+003B (;) to serialization. +

    2. Append U+003B (;) followed by U+0020 SPACE to serialization.

    3. Append name to serialization.