8000 gh-97646: Change `.js` and `.mjs` files mimetype to conform to RFC 92… · python/cpython@2a16835 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2a16835

Browse files
authored
gh-97646: Change .js and .mjs files mimetype to conform to RFC 9239 (#97934)
1 parent 3108fc1 commit 2a16835

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Lib/mimetypes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,8 +427,8 @@ def _default_mime_types():
427427
# Make sure the entry with the preferred file extension for a particular mime type
428428
# appears before any others of the same mimetype.
429429
types_map = _types_map_default = {
430-
'.js' : 'application/javascript',
431-
'.mjs' : 'application/javascript',
430+
'.js' : 'text/javascript',
431+
'.mjs' : 'text/javascript',
432432
'.json' : 'application/json',
433433
'.webmanifest': 'application/manifest+json',
434434
'.doc' : 'application/msword',
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Replace deprecated ``application/javascript`` with ``text/javascript`` in :mod:`mimetypes`. See :rfc:`9239`. Patch by Noam Cohen.

0 commit comments

Comments
 (0)
0