Commit db2bf154 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

mime: update .mjs MIME type from text/ to application/javascript

.mjs should be the same MIME type as .js, and RFC 4329 says that
text/javascript is obsolete, even back in 2006:

    https://tools.ietf.org/html/rfc4329#section-7.1

I didn't notice this when I recently reviewed CL 169502.

Also, re-sort it.

Updates #30547

Change-Id: I8ed8ddaf06c8a08b010423ebd071f39ef3a325e5
Reviewed-on: https://go-review.googlesource.com/c/go/+/175459Reviewed-by: default avatarAndrew Bonventre <andybons@golang.org>
Run-TryBot: Andrew Bonventre <andybons@golang.org>
parent c2f7dd18
...@@ -61,15 +61,15 @@ var builtinTypesLower = map[string]string{ ...@@ -61,15 +61,15 @@ var builtinTypesLower = map[string]string{
".gif": "image/gif", ".gif": "image/gif",
".htm": "text/html; charset=utf-8", ".htm": "text/html; charset=utf-8",
".html": "text/html; charset=utf-8", ".html": "text/html; charset=utf-8",
".jpg": "image/jpeg",
".jpeg": "image/jpeg", ".jpeg": "image/jpeg",
".jpg": "image/jpeg",
".js": "application/javascript", ".js": "application/javascript",
".wasm": "application/wasm", ".mjs": "application/javascript",
".pdf": "application/pdf", ".pdf": "application/pdf",
".png": "image/png", ".png": "image/png",
".svg": "image/svg+xml", ".svg": "image/svg+xml",
".wasm": "application/wasm",
".xml": "text/xml; charset=utf-8", ".xml": "text/xml; charset=utf-8",
".mjs": "text/javascript",
} }
var once sync.Once // guards initMime var once sync.Once // guards initMime
......
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