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.

Title: MIME type for *.zip becomes application/x-zip-compressed on Windows
Type: behavior Stage: resolved
Components: Windows Versions: Python 3.8
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: danny87105, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2020-09-07 15:45 by danny87105, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg376508 - (view) Author: Danny Lin (danny87105) Date: 2020-09-07 15:45
On Windows, command "python -m mimetypes" outputs "type: application/x-zip-compressed encoding: None", while it's "type: application/zip encoding: None" on Linux.

According to the in CPython source code, the MIME type for '.zip' is 'application/zip'. It seems to be overwritten somewhere on Windows.
msg377628 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2020-09-28 20:57
mimetype uses the system database for MIME types, which on Windows is application/x-zip-compressed, so this is by design.

If you have a need to specify a MIME type that does not match the system you're on, you'll need your own logic.
Date User Action Args
2022-04-11 14:59:35adminsetgithub: 85904
2020-09-28 20:57:07steve.dowersetstatus: open -> closed
resolution: not a bug
messages: + msg377628

stage: resolved
2020-09-07 15:45:21danny87105create