[common] Add a few canonical MIME types (as returned by http.DetectContentType
).
This commit is contained in:
parent
26e58a8f7a
commit
b45b296f60
2 changed files with 22 additions and 0 deletions
|
@ -244,6 +244,7 @@ func init () {
|
||||||
|
|
||||||
|
|
||||||
CanonicalHeaderValues = append (CanonicalHeaderValues, MimeTypes ...)
|
CanonicalHeaderValues = append (CanonicalHeaderValues, MimeTypes ...)
|
||||||
|
CanonicalHeaderValues = append (CanonicalHeaderValues, MimeTypesExtras ...)
|
||||||
|
|
||||||
CanonicalHeaderValuesMap = make (map[string]string, len (CanonicalHeaderValues))
|
CanonicalHeaderValuesMap = make (map[string]string, len (CanonicalHeaderValues))
|
||||||
CanonicalHeaderValuesArraysMap = make (map[string][]string, len (CanonicalHeaderValues))
|
CanonicalHeaderValuesArraysMap = make (map[string][]string, len (CanonicalHeaderValues))
|
||||||
|
|
|
@ -199,3 +199,24 @@ var MimeTypesAliases = map[string]string {
|
||||||
"text/xml; charset=utf-8" : MimeTypeXml,
|
"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",
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue