Skip to content

gh-129965: Add more missing MIME types #132845

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

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

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Apr 23, 2025

Based on the last list here:

uv run --python python3.14 --with content-types https://raw.githubusercontent.com/mikeckennedy/content-types/refs/heads/main/samples/compare_to_builtin.py
Compare types in mimetypes vs content-types.
There are 6 types where mimetypes and content-types disagree
mimetypes: .avi video/vnd.avi, content-types: .avi video/x-msvideo
mimetypes: .dll application/octet-stream, content-types: .dll application/x-msdownload
mimetypes: .exe application/octet-stream, content-types: .exe application/x-msdownload
mimetypes: .obj application/octet-stream, content-types: .obj model/obj
mimetypes: .wav audio/vnd.wave, content-types: .wav audio/wav
mimetypes: .xml text/xml, content-types: .xml application/xml

There are 14 types in mimetypes that are not in content-types
.emf : image/emf
.eot : application/vnd.ms-fontobject
.fits: image/fits
.g3  : image/g3fax
.jp2 : image/jp2
.jpm : image/jpm
.jpx : image/jpx
.mk3d: video/matroska-3d
.mka : audio/matroska
.mkv : video/matroska
.ogx : application/ogg
.t38 : image/t38
.tfx : image/tiff-fx
.wmf : image/wmf

There are 14 types in content-types that are not in mimetypes
.7z    -> application/x-7z-compressed
.apk   -> application/vnd.android.package-archive
.deb   -> application/x-debian-package
.glb   -> model/gltf-binary
.gltf  -> model/gltf+json
.gz    -> application/gzip
.m4v   -> video/mp4
.map   -> application/json
.php   -> application/x-httpd-php
.rar   -> application/vnd.rar
.rpm   -> application/x-rpm
.stl   -> model/stl
.tgz   -> application/gzip
.wmv   -> video/x-ms-wmv

I used the MIME types from the following sources.

From https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/MIME_types/Common_types

  • application/x-httpd-php

From Wikipedia:

  • application/vnd.android.package-archive (added to non-strict list because not in IANA or x- prefix)
  • application/x-7z-compressed
  • video/x-m4v

From https://mimetype.io

  • application/x-debian-package
  • application/x-rpm

From https://learn.microsoft.com/en-us/previous-versions/windows/desktop/wmp/file-name-extensions

  • video/x-ms-wmv

All the rest from https://www.iana.org/assignments/media-types/media-types.xhtml


I didn't add these because they're not in IANA or MDN, and I didn't find any authoritative sources:

.map   -> application/json
.tgz   -> application/gzip

📚 Documentation preview 📚: https://cpython-previews--132845.org.readthedocs.build/

@hugovk hugovk added the type-feature A feature request or enhancement label Apr 23, 2025
@hugovk hugovk requested a review from a team as a code owner April 23, 2025 16:06
@bedevere-app bedevere-app bot mentioned this pull request Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting core review type-feature A feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant