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

fix(ext/web): use mimesniff in FileAPI #16233

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

marcosc90
Copy link
Contributor

ref: #16225

@marcosc90
Copy link
Contributor Author

Managed to get to 1896/1898 up from 1027, but it now conflicts with FileAPI tests.

web-platform-tests/wpt#36377

@marcosc90
Copy link
Contributor Author

FileAPI spec is broken:

w3c/FileAPI#43
w3c/FileAPI#122

I think we should favor MIME Sniffing spec, and disable the broken FileAPI tests.

@marcosc90 marcosc90 changed the title [WIP] fix(ext/mimesniff): fix parseMimeType [WIP] fix(web): use mimesniff in FileAPi Oct 29, 2022
@marcosc90 marcosc90 changed the title [WIP] fix(web): use mimesniff in FileAPi [WIP] fix(web): use mimesniff in FileAPI Oct 29, 2022
@marcosc90 marcosc90 marked this pull request as ready for review October 29, 2022 22:08
@marcosc90 marcosc90 changed the title [WIP] fix(web): use mimesniff in FileAPI fix(web): use mimesniff in FileAPI Oct 29, 2022
@marcosc90 marcosc90 changed the title fix(web): use mimesniff in FileAPI fix(ext/web): use mimesniff in FileAPI Oct 29, 2022
"request-init-contenttype.any.html": true,
"request-init-contenttype.any.worker.html": true,
"request-init-contenttype.any.html": [
"Default Content-Type for Request with Blob body (set type)",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This fails because it expects a/b; c=d, but we're now setting to a/b;c=d as per the MIME Sniffing spec

@jimmywarting
Copy link
Contributor

👍 finally time someone did something about this.
have long been waiting for meta values to not be casted into lowercase, as that only breaks the real value (whatwg/html#6251)

The WPT test should be changed to match the mime sniffing api IMO

Copy link
Collaborator

@aapoalas aapoalas left a comment

Choose a reason for hiding this comment

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

Hello, could you rebase this please? It seems like the spec issues have at least moved forward a little?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants