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.

Author smeans
Recipients smeans
Date 2021-04-29.09:15:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1619687748.29.0.910634957661.issue43975@roundup.psfhosted.org>
In-reply-to
Content
This isn't *technically* a bug in Python, but it really presents like one. I like to run the http.server for quick-and-dirty web development, but today Chrome refused to load any of my .js files because the server is returning a MIME type of 'text/plain'. I downloaded server.py and played with it for a while, and realized that mimetypes.guess_type() is returning 'text/plain' for .js files. So then I read further into the code and realized that mimetypes is harvesting MIME types from the Windows registry. And for some reason, at least on my machine, HKEY_CLASSES_ROOT\.js\Content Type was 'text/plain'. Changing it to 'application/javascript' fixed my issue, but I'm guessing that a lot of Python devs won't bother to dig this deep. I don't know what an appropriate fix would be, other than to probably trust the built-in MIME types over the ones harvested from Windows.
History
Date User Action Args
2021-04-29 09:15:48smeanssetrecipients: + smeans
2021-04-29 09:15:48smeanssetmessageid: <1619687748.29.0.910634957661.issue43975@roundup.psfhosted.org>
2021-04-29 09:15:48smeanslinkissue43975 messages
2021-04-29 09:15:48smeanscreate