Skip to content

Commit ae3f98c

Browse files
aiskmvdan
authored andcommitted
mime: add .json to built-in list of MIME types
Since json is popular and mime package's builtin type does not contain it, and some Linux distributions do not contain the '/etc/mime.types' file with minimal installations. Change-Id: I933393c82be296ef176206c253f4dd19b6f33bb1 GitHub-Last-Rev: ce4eae5 GitHub-Pull-Request: #34737 Reviewed-on: https://go-review.googlesource.com/c/go/+/199657 Run-TryBot: Daniel Martí <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent b00ebea commit ae3f98c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/mime/type.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ var builtinTypesLower = map[string]string{
6565
".jpeg": "image/jpeg",
6666
".jpg": "image/jpeg",
6767
".js": "text/javascript; charset=utf-8",
68+
".json": "application/json",
6869
".mjs": "text/javascript; charset=utf-8",
6970
".pdf": "application/pdf",
7071
".png": "image/png",

0 commit comments

Comments
 (0)