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 Daniel Black
Recipients Daniel Black
Date 2019-03-30.21:18:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1553980712.92.0.44378409883.issue36489@roundup.psfhosted.org>
In-reply-to
Content
In https://bugs.python.org/issue36460 (which should be probably be disregarded until AMP is in RFC) I discovered that the types_map dictionary within the mimetypes module is a key: str to key: str (1:1) relationship. The reality is that many filename extensions commonly support multiple content-types and even sub types. A more useful structure might look like:

(fne is "file name extension" aka foo)

{
  '.fne': ['type1/subtype', 'type2/subtype'],
  '.htm': ['text/html', 'text/css', 'text/javascript'],
  '.html': ['text/html', 'text/css', 'text/javascript']
} 

However this seems to compete with the functionality of the types map so another consideration is content-types_map where the content-type is the key and the pair values are lists of valid filename extensions:

{
  'audio/x-aiff': ['.aifc', '.aiff', '.au'],
  'text/html': ['.html', '.htm']
}
History
Date User Action Args
2019-03-30 21:18:32Daniel Blacksetrecipients: + Daniel Black
2019-03-30 21:18:32Daniel Blacksetmessageid: <1553980712.92.0.44378409883.issue36489@roundup.psfhosted.org>
2019-03-30 21:18:32Daniel Blacklinkissue36489 messages
2019-03-30 21:18:32Daniel Blackcreate