diff options
Diffstat (limited to 'libgo/go/net/http/sniff.go')
-rw-r--r-- | libgo/go/net/http/sniff.go | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libgo/go/net/http/sniff.go b/libgo/go/net/http/sniff.go index 365a36c..c1494ab 100644 --- a/libgo/go/net/http/sniff.go +++ b/libgo/go/net/http/sniff.go @@ -13,7 +13,7 @@ import ( const sniffLen = 512 // DetectContentType implements the algorithm described -// at http://mimesniff.spec.whatwg.org/ to determine the +// at https://mimesniff.spec.whatwg.org/ to determine the // Content-Type of the given data. It considers at most the // first 512 bytes of data. DetectContentType always returns // a valid MIME type: if it cannot determine a more specific one, it @@ -136,16 +136,19 @@ var sniffSignatures = []sniffSig{ mask: []byte("\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF"), ct: "application/vnd.ms-fontobject", }, - &exactSig{[]byte("\x00\x01\x00\x00"), "application/font-ttf"}, - &exactSig{[]byte("OTTO"), "application/font-off"}, - &exactSig{[]byte("ttcf"), "application/font-cff"}, - &exactSig{[]byte("wOFF"), "application/font-woff"}, + &exactSig{[]byte("\x00\x01\x00\x00"), "font/ttf"}, + &exactSig{[]byte("OTTO"), "font/otf"}, + &exactSig{[]byte("ttcf"), "font/collection"}, + &exactSig{[]byte("wOFF"), "font/woff"}, + &exactSig{[]byte("wOF2"), "font/woff2"}, &exactSig{[]byte("\x1A\x45\xDF\xA3"), "video/webm"}, &exactSig{[]byte("\x52\x61\x72\x20\x1A\x07\x00"), "application/x-rar-compressed"}, &exactSig{[]byte("\x50\x4B\x03\x04"), "application/zip"}, &exactSig{[]byte("\x1F\x8B\x08"), "application/x-gzip"}, + &exactSig{[]byte("\x00\x61\x73\x6D"), "application/wasm"}, + mp4Sig{}, textSig{}, // should be last |