This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: mimetypes guesses XSL mimetype when passed an XML file
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.7, Python 3.6, Python 3.5, Python 2.7
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Add preferred extensions for MIME types
View: 1043134
Assigned To: Nosy List: Aleksey Bilogur, martin.panter
Priority: normal Keywords:

Created on 2017-03-16 03:53 by Aleksey Bilogur, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg289705 - (view) Author: Aleksey Bilogur (Aleksey Bilogur) Date: 2017-03-16 03:53
Copied over from an unanswered StackOverflow thread (http://stackoverflow.com/questions/42542433/why-does-python-mimetype-guess-xsl-when-passed-an-xml-file):

When passed a file with a mimetype application/xml, the Python std lib mimetypes.guess_extension method guesses an .xsl extension. This is actually hard-coded in.

This seems wrong to me. But what do I know?
msg289706 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2017-03-16 04:25
Perhaps a duplicate of Issue 1043134?
History
Date User Action Args
2022-04-11 14:58:44adminsetgithub: 74009
2017-05-08 22:17:56martin.pantersetstatus: open -> closed
resolution: duplicate
stage: resolved
2017-03-16 04:25:15martin.pantersetversions: - Python 3.3, Python 3.4
nosy: + martin.panter

messages: + msg289706

superseder: Add preferred extensions for MIME types
2017-03-16 03:53:49Aleksey Bilogursettitle: ython guesses XSL mimetype when passed an XML file -> mimetypes guesses XSL mimetype when passed an XML file
2017-03-16 03:53:24Aleksey Bilogurcreate