Commit 99df76f0 authored by Andrew Bonventre's avatar Andrew Bonventre Committed by Daniel Martí

mime: update type of .js and .mjs files to text/javascript

application/javascript is being deprecated per
https://datatracker.ietf.org/doc/draft-ietf-dispatch-javascript-mjs/

Specify a charset to be consistent with other text/* mime types.

Fixes #32351

Change-Id: I7300f6cfdbcf574103764991cb75172a252a3400
Reviewed-on: https://go-review.googlesource.com/c/go/+/186927
Run-TryBot: Andrew Bonventre <andybons@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarDaniel Martí <mvdan@mvdan.cc>
parent 54a9c165
...@@ -63,8 +63,8 @@ var builtinTypesLower = map[string]string{ ...@@ -63,8 +63,8 @@ var builtinTypesLower = map[string]string{
".html": "text/html; charset=utf-8", ".html": "text/html; charset=utf-8",
".jpeg": "image/jpeg", ".jpeg": "image/jpeg",
".jpg": "image/jpeg", ".jpg": "image/jpeg",
".js": "application/javascript", ".js": "text/javascript; charset=utf-8",
".mjs": "application/javascript", ".mjs": "text/javascript; charset=utf-8",
".pdf": "application/pdf", ".pdf": "application/pdf",
".png": "image/png", ".png": "image/png",
".svg": "image/svg+xml", ".svg": "image/svg+xml",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment