You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Duplicated keys in MIME type_map with different values #76048
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2017-11-17.10:11:03.567>created_at=<Date2017-10-25.10:14:00.897>labels= ['3.7', 'library']
title='Duplicated keys in MIME type_map with different values'updated_at=<Date2017-11-17.10:11:03.566>user='https://github.com/markshannon'
For cdf, Wolframalpha is using application/cdf it seems (without it being registered) whereas NetCDF suggests application/x-netcdf so that seems reasonable (and is the current value).
For context, these duplicates were introduced here: a3689fe
and noted first here: 107771a
changed the title [-]Duplicated keys, but with different values in dictionary literals[/-][+]Duplicated keys in MIME type_map with different values[/+]on Oct 25, 2017
Activity
markshannon commentedon Oct 25, 2017
Here
https://github.com/python/cpython/blob/master/Lib/mimetypes.py#L416
and here
https://github.com/python/cpython/blob/master/Lib/mimetypes.py#L526
I have no idea which is the correct value for either, but the code is misleading at best.
markshannon commentedon Oct 25, 2017
I hadn't noticed the comments on the lines above saying "Duplicates :(", so I'm obviously not the first to notice.
Cryvate commentedon Oct 25, 2017
So for excel, 'application/excel' is not listed at http://www.iana.org/assignments/media-types as suggested by the comment at:
https://github.com/python/cpython/blob/master/Lib/mimetypes.py#L397
whereas 'applicaton/vnd.ms-excel' is listed. See also
https://stackoverflow.com/questions/974079/setting-mime-type-for-excel-document.
For cdf, Wolframalpha is using application/cdf it seems (without it being registered) whereas NetCDF suggests application/x-netcdf so that seems reasonable (and is the current value).
For context, these duplicates were introduced here:
a3689fe
and noted first here:
107771a
[-]Duplicated keys, but with different values in dictionary literals[/-][+]Duplicated keys in MIME type_map with different values[/+]asvetlov commentedon Nov 17, 2017
New changeset f02f5e5 by Andrew Svetlov (Henk-Jaap Wagenaar) in branch 'master':
bpo-31867: Remove duplicates in default mimetypes. (bpo-4388)
f02f5e5
asvetlov commentedon Nov 17, 2017
Henk-Jaap thanks for contribution!