Skip to content

Commit

Permalink
gh-97646: Change .js and .mjs files mimetype to conform to RFC 92…
Browse files Browse the repository at this point in the history
…39 (#97934)
  • Loading branch information
noamcohen97 authored Oct 7, 2022
1 parent 3108fc1 commit 2a16835
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Lib/mimetypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,8 @@ def _default_mime_types():
# Make sure the entry with the preferred file extension for a particular mime type
# appears before any others of the same mimetype.
types_map = _types_map_default = {
'.js' : 'application/javascript',
'.mjs' : 'application/javascript',
'.js' : 'text/javascript',
'.mjs' : 'text/javascript',
'.json' : 'application/json',
'.webmanifest': 'application/manifest+json',
'.doc' : 'application/msword',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Replace deprecated ``application/javascript`` with ``text/javascript`` in :mod:`mimetypes`. See :rfc:`9239`. Patch by Noam Cohen.

0 comments on commit 2a16835

Please sign in to comment.