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: + +
If mimeType is failure, then return fallbackEncoding. + +
If mimeType["charset
"] does not exist, then return
+ fallbackEncoding.
+
+
Let tentativeEncoding be the result of getting an encoding from
+ mimeType["charset
"].
+
+
If tentativeEncoding is failure, then return fallbackEncoding. + +
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