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

Implement MIME sniffing #14024

Open
Ms2ger opened this issue Nov 2, 2016 · 8 comments
Open

Implement MIME sniffing #14024

Ms2ger opened this issue Nov 2, 2016 · 8 comments
Labels

Comments

@Ms2ger
Copy link
Contributor

@Ms2ger Ms2ger commented Nov 2, 2016

There's https://mimesniff.spec.whatwg.org/ , but it's not quite clear to me where it's invoked.

@jdm
Copy link
Member

@jdm jdm commented Nov 2, 2016

N.B. we should revert the changes to mime_sniffing_font_context.html from #13931 as part of this work.

@jdm jdm added the A-network label Nov 2, 2016
@dpyro
Copy link
Contributor

@dpyro dpyro commented Dec 12, 2016

I’m taking a look at it right now and seeing what can be done to simplify and solidify the implementation.

@KiChjang
Copy link
Member

@KiChjang KiChjang commented Dec 12, 2016

Does components/net/mime_classifier.rs not contain an implementation of the MIME sniffing algorithm already?

@dpyro
Copy link
Contributor

@dpyro dpyro commented Dec 12, 2016

Looks like it, @KiChjang. Personally I’d like it decomposed down into smaller submodules. Then again that may just be bikeshedding on my part. Besides, “if it ain’t broke, don’t fix it”.

@KiChjang
Copy link
Member

@KiChjang KiChjang commented Dec 12, 2016

I'm actually more inclined to make it conform more to the algorithms as defined by the spec, but I'm not sure how much effort is required to do so.

@jdm
Copy link
Member

@jdm jdm commented Dec 13, 2016

It's supposed to already conform. This issue is specifically talking about integrating the MIME sniffing into the fetch network stack, now that the old network stack that supported it has been removed.

@dpyro
Copy link
Contributor

@dpyro dpyro commented Dec 13, 2016

This is blocking #14521 if we want to do it properly, since nosniff needs to compare the Content-Type header to the result of mimesniff.

@Ms2ger
Copy link
Contributor Author

@Ms2ger Ms2ger commented Dec 13, 2016

If integrating this into the fetch stack at all is even the right answer; it might be better to integrate it into the code that calls into the fetch stack instead. After all, the fetch stack doesn't interpret the bytes it returns.

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

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.