Skip to content

Commit

Permalink
pythongh-97646: Change .js and .mjs files mimetype to conform to …
Browse files Browse the repository at this point in the history
…RFC 9239 (python#97934)
  • Loading branch information
noamcohen97 authored and mpage committed Oct 11, 2022
1 parent dc2c10e commit 9f5d3b5
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 9f5d3b5

Please sign in to comment.