classification
Title: mimetypes guesses XSL mimetype when passed an XML file
Type: Stage:
Components: Library (Lib) Versions: Python 3.7, Python 3.6, Python 3.5, Python 2.7
process
Status: open Resolution:
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 2017-03-16 04:25 by martin.panter.

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
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