diff --git a/fetch.bs b/fetch.bs index 26efa08e2..dfabed5a1 100644 --- a/fetch.bs +++ b/fetch.bs @@ -3491,6 +3491,30 @@ Content-Type: +

To legacy extract an encoding given failure or a MIME type +mimeType and an encoding fallbackEncoding, run these steps: + +

    +
  1. If mimeType is failure, then return fallbackEncoding. + +

  2. If mimeType["charset"] does not exist, then return + fallbackEncoding. + +

  3. Let tentativeEncoding be the result of getting an encoding from + mimeType["charset"]. + +

  4. If tentativeEncoding is failure, then return fallbackEncoding. + +

  5. Return tentativeEncoding. +

+ +
+

This algorithm allows mimeType to be failure so it can be more easily combined with + extract a MIME type. + +

It is denoted as legacy as modern formats are to exclusively use UTF-8. +

+

`X-Content-Type-Options` header