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

Supplied MIME type from file system is unclear #138

Open
Jayman2000 opened this issue Feb 13, 2021 · 1 comment
Open

Supplied MIME type from file system is unclear #138

Jayman2000 opened this issue Feb 13, 2021 · 1 comment

Comments

@Jayman2000
Copy link

According to the supplied MIME type detection algorithm,

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

This is not clear. File systems store up to three pieces of data about each file:

  1. The name of the file.
  2. The contents of the file.
  3. Metadata about the file.

As a result there's a few ways to interpret that instruction:

  1. Use the filename to determine the supplied MIME type. -- If this is what was intended, then the spec should have rules for determining a MIME type from a filename.
  2. Use the file's contents to determine its supplied MIME type. -- I don't think that this was what was intended because other parts of the spec talk about determining MIME types based on contents.
  3. As part of the file's metadata, the file system stores its MIME type. Use that MIME type as the supplied MIME type. -- This seems like what was intended, but I haven't been able to find any evidence that there's file systems that store a files MIME type.
  4. Some combination of the previous interpretations.

It also might be more accurate to say:

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

@GPHemsley
Copy link
Member

It also might be more accurate to say:

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

This is the one that was intended.

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

No branches or pull requests

2 participants