-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 a comprehensive MIME registry #4632
Comments
We can start with a Mime registry with some default extensions and a way to add more extensions to the registry. Then in a separate PR we could load mime types from the OS if available. |
And the existing shards would just add to the standard registry instead of providing alternative registries. |
Note that on linux (at least debian/ubuntu) a mime type database can usually be found at
|
Perhaps an official shard to add magic-guessing to the registry too wouldn't be a terrible idea. |
Go uses: var typeFiles = []string{
"/etc/mime.types",
"/etc/apache2/mime.types",
"/etc/apache/mime.types",
} |
Perhaps it should be in stdlib, or the whole mime registry be a mime-types shard (nothing in stdlib). Go has a bunch of locations for each platform (windows registry, different places across the filesystem on posix systems): |
As long as |
@asterite on #2470 (comment):
There are three shards who provide a MIME registry:
And ysbaddaden/frost has a extensive MIME registry.
They all rely on a custom mime type database in form of a JSON file included in the shard. While this can be required in some cases, I feel like the stdlib implementation should probably just rely on the mime types registry of the operating system (like the Go example).
The text was updated successfully, but these errors were encountered: