Skip to content

Commit

Permalink
mime: change *.js mime type to application/javascript, not x-javascript
Browse files Browse the repository at this point in the history
We delayed doing this for 4 years for fear that it might break something,
but it was standardized (RFC 4329) 12 years ago, and the default in Debian
and other places is correct:

   $ cat /etc/mime.types  | grep js$
   application/javascript                          js

Time for us to change too.

I doubt there will be problems, but we'll see during the Go 1.11 beta.

Fixes #7498

Change-Id: Iba0bf8a6e707a64dd63317e1c0d6dd9a18634527
Reviewed-on: https://go-review.googlesource.com/120058
Reviewed-by: Andrew Bonventre <[email protected]>
Run-TryBot: Brad Fitzpatrick <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
  • Loading branch information
bradfitz committed Jun 20, 2018
1 parent f3f7bd5 commit feeff23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mime/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ var builtinTypesLower = map[string]string{
".htm": "text/html; charset=utf-8",
".html": "text/html; charset=utf-8",
".jpg": "image/jpeg",
".js": "application/x-javascript",
".js": "application/javascript",
".wasm": "application/wasm",
".pdf": "application/pdf",
".png": "image/png",
Expand Down

0 comments on commit feeff23

Please sign in to comment.