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 _savage
Recipients _savage
Date 2019-08-24.23:06:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1566687977.17.0.676940180845.issue37943@roundup.psfhosted.org>
In-reply-to
Content
I think this one’s quite easy to reproduce:

  Python 3.7.4 (default, Jul 11 2019, 01:08:00) 
  [Clang 10.0.1 (clang-1001.0.46.4)] on darwin
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import mimetypes
  >>> mimetypes.guess_extension("image/jpg")  # Expected ".jpg"
  >>> mimetypes.guess_extension("image/jpeg")  # Expected ".jpg"
  '.jpe'

According to MDN

  https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types

only "image/jpeg" is a valid MIME type; however, I’ve seen quite a bit of "image/jpg" out in the wild and I think that ought to be accounted for too.

Before I look into submitting a PR I wanted to confirm that this is an issue that ought to be fixed. I think it is.
History
Date User Action Args
2019-08-24 23:06:17_savagesetrecipients: + _savage
2019-08-24 23:06:17_savagesetmessageid: <1566687977.17.0.676940180845.issue37943@roundup.psfhosted.org>
2019-08-24 23:06:16_savagelinkissue37943 messages
2019-08-24 23:06:16_savagecreate