Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add algorithm to extract an encoding from a MIME type #1447

Merged
merged 2 commits into from
Jun 1, 2022

Conversation

annevk
Copy link
Member

@annevk annevk commented Jun 1, 2022

This is useful for HTML's fetch a classic script and Fetch's upcoming opaque-response blocking. It will also be useful to more tightly define equivalent legacy setups elsewhere.


Preview | Diff

This is useful for HTML's fetch a classic script and Fetch's upcoming opaque-response blocking. It will also be useful to more tightly define equivalent legacy setups elsewhere.
Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At first I thought this might belong better in mimesniff but if it's generally meant to be used with "extract a MIME type" then here makes sense.

fetch.bs Outdated
@@ -3491,6 +3491,30 @@ Content-Type:
</table>
</div>

<p>To <dfn export>legacy extract an encoding</dfn> given failure or a <a for=/>MIME type</a>
<var>mimeType</var> and an <a for=/>encoding</a> <var>encoding</var>, run these steps:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

encoding -> fallbackEncoding would be a big improvement IMO.

@annevk annevk merged commit 82bb961 into main Jun 1, 2022
@annevk annevk deleted the annevk/extract-encoding branch June 1, 2022 16:33
domenic pushed a commit to whatwg/html that referenced this pull request Jun 1, 2022
mfreed7 pushed a commit to mfreed7/html that referenced this pull request Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants