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 milahu
Recipients iritkatriel, milahu
Date 2022-01-18.14:41:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1642516913.11.0.902419693635.issue46035@roundup.psfhosted.org>
In-reply-to
Content
this issue is different than Issue32462
because here, both entries are valid

```
cat /etc/mime.types | grep javascript
application/javascript        js
application/x-javascript      js
```

but the alphabetical ordering of the file
makes the last entry take precedence

python could be smarter at parsing the /etc/mime.types file
in that it could give lower precedence to the deprecated types

pseudocode:

deprecated_mimetypes = set(...) # values from rfc4329
mimetype_of_ext = dict()
# parser loop
for ...
  ext = "..."
  mimetype = "..."
  if ext in mimetype_of_ext:
    old_mimetype = mimetype_of_ext[ext]
    if old_mimetype in deprecated_mimetypes:
      mimetype_of_ext[ext] = mimetype # replace old with new
      # assume that mimetype is not deprecated
  mimetype_of_ext[ext] = mimetype
History
Date User Action Args
2022-01-18 14:41:53milahusetrecipients: + milahu, iritkatriel
2022-01-18 14:41:53milahusetmessageid: <1642516913.11.0.902419693635.issue46035@roundup.psfhosted.org>
2022-01-18 14:41:53milahulinkissue46035 messages
2022-01-18 14:41:53milahucreate