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

Stylesheet loads ignore responses with MIME types that don't match text/css #26640

Open
jdm opened this issue May 25, 2020 · 1 comment
Open

Stylesheet loads ignore responses with MIME types that don't match text/css #26640

jdm opened this issue May 25, 2020 · 1 comment
Labels

Comments

@jdm
Copy link
Member

@jdm jdm commented May 25, 2020

This means that any page relying on a file:// URL, or any webserver like the built-in python one that checks for common extensions like .css to decide what mime type to return will cause unexpected behaviour when loaded in servo vs. Firefox.

@jdm jdm added the A-content/css label May 25, 2020
@SimonSapin
Copy link
Member

@SimonSapin SimonSapin commented May 25, 2020

Relevant specs:

Quirks mode is relevant.

Where https://mimesniff.spec.whatwg.org/#supplied-mime-type-detection-algorithm says to use the Content-Type header for HTTP(S), for file: it says:

If the resource is retrieved directly from the file system, set supplied-type to the MIME type provided by the file system.

I’m not sure what this is supposed to mean. I’m not aware of any filesystem such as NTFS, ext4 etc encoding MIME type information. Is this saying to take a guess based on a table of "well-known" file name extensions, similar to https://docs.python.org/3/library/mimetypes.html#mimetypes.guess_type ? Probably not, as the table would hopefully be specified in that case.

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
2 participants
You can’t perform that action at this time.