// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd
+// +build aix darwin dragonfly freebsd hurd js,wasm linux nacl netbsd openbsd solaris
package mime
"strings"
)
+func init() {
+ osInitMime = initMimeUnix
+}
+
var typeFiles = []string{
"/etc/mime.types",
"/etc/apache2/mime.types",
}
}
-func initMime() {
+func initMimeUnix() {
for _, filename := range typeFiles {
loadMimeFile(filename)
}
func initMimeForTests() map[string]string {
typeFiles = []string{"testdata/test.types"}
return map[string]string{
- ".t1": "application/test",
+ ".T1": "application/test",
".t2": "text/test; charset=utf-8",
".png": "image/png",
}