Discussion:
Conflicting/incorrect MIME type for a file extension
(too old to reply)
JJ
2018-04-18 23:26:12 UTC
Permalink
I was writing a VBScript to check the integrity of the system's MIME type
database in the registry, and found out that there are several conflicts.

For example, the `*.cer` file is both registered as
`application/x-x509-ca-cert` and `application/pkix-cert`. i.e.:

File extension:
[HKEY_CLASSES_ROOT\.cer]
@="CERFile"
"Content Type"="application/x-x509-ca-cert"

MIME database:
[HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/pkix-cert]
"Extension"=".cer"

I understand that a file extension may have more than one MIME type. For
example, the `*.3gp` file extension. Its MIME type can be either
`video/3gpp` or `audio/3gpp`, depending on the file contents. This is
correct since the MIME type can not be determined by the file extension name
alone.

So, which one is the correct MIME for the above `*.cer` file extension? Is
it both also? i.e. it depend on the file data.

Other conflicting MIMEs whoch are found by the script are listed below.

.m3u: ext=audio/x-mpegurl, db=audio/mpegurl
.sit: ext=application/x-stuffit, db=application/x-sit
.zip: ext=application/zip, db=application/x-zip-compressed

Are all of these associations correct?

I also found that the `*.aac` file extension is registered as having
`audio/vnd.dlna.adts` MIME type, instead of `audio/aac`. AFAIK,
`audio/vnd.dlna.adts` is for `*.adts` file extension.
Bob_S
2018-04-19 00:46:47 UTC
Permalink
Post by JJ
I was writing a VBScript to check the integrity of the system's MIME type
database in the registry, and found out that there are several conflicts.
For example, the `*.cer` file is both registered as
[HKEY_CLASSES_ROOT\.cer]
@="CERFile"
"Content Type"="application/x-x509-ca-cert"
[HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/pkix-cert]
"Extension"=".cer"
I understand that a file extension may have more than one MIME type. For
example, the `*.3gp` file extension. Its MIME type can be either
`video/3gpp` or `audio/3gpp`, depending on the file contents. This is
correct since the MIME type can not be determined by the file extension name
alone.
So, which one is the correct MIME for the above `*.cer` file extension? Is
it both also? i.e. it depend on the file data.
Other conflicting MIMEs whoch are found by the script are listed below.
.m3u: ext=audio/x-mpegurl, db=audio/mpegurl
.sit: ext=application/x-stuffit, db=application/x-sit
.zip: ext=application/zip, db=application/x-zip-compressed
Are all of these associations correct?
I also found that the `*.aac` file extension is registered as having
`audio/vnd.dlna.adts` MIME type, instead of `audio/aac`. AFAIK,
`audio/vnd.dlna.adts` is for `*.adts` file extension.
You may not have found this listing but it does answer your question: Yes
it is registered as both.

https://www.sitepoint.com/mime-types-complete-list/
--
Bob S.
JJ
2018-04-20 11:47:21 UTC
Permalink
Post by Bob_S
You may not have found this listing but it does answer your question: Yes
it is registered as both.
https://www.sitepoint.com/mime-types-complete-list/
Oh, OK. Thanks.

Loading...