[common] Add a few canonical MIME types (as returned by http.DetectContentType).

This commit is contained in:
Ciprian Dorin Craciun 2021-12-21 20:28:22 +02:00
parent 26e58a8f7a
commit b45b296f60
2 changed files with 22 additions and 0 deletions

View file

@ -244,6 +244,7 @@ func init () {
CanonicalHeaderValues = append (CanonicalHeaderValues, MimeTypes ...)
CanonicalHeaderValues = append (CanonicalHeaderValues, MimeTypesExtras ...)
CanonicalHeaderValuesMap = make (map[string]string, len (CanonicalHeaderValues))
CanonicalHeaderValuesArraysMap = make (map[string][]string, len (CanonicalHeaderValues))

View file

@ -199,3 +199,24 @@ var MimeTypesAliases = map[string]string {
"text/xml; charset=utf-8" : MimeTypeXml,
}
var MimeTypesExtras = []string {
"text/plain; charset=utf-16be",
"text/plain; charset=utf-16le",
"audio/aiff",
"audio/basic",
"audio/wave",
"video/avi",
"font/collection",
"application/ogg",
"application/vnd.ms-fontobject",
"application/wasm",
"application/x-gzip",
"application/x-rar-compressed",
}