diff options
| author | Agniva De Sarker <agnivade@yahoo.co.in> | 2018-03-25 22:36:33 +0530 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2018-03-25 17:36:45 +0000 |
| commit | c0ce2925bd975f24d9983d596d84e6b2145cb43a (patch) | |
| tree | 60ea358d07385cd63e314dd71b43e5337c0cf4d9 /src/net/http/sniff_test.go | |
| parent | 48c4eeeed7a18da80b77ebee318f87786a63ae1c (diff) | |
| download | go-c0ce2925bd975f24d9983d596d84e6b2145cb43a.tar.xz | |
net/http: use top-level font media type
RFC 8081 declares a top level font media type for all types of fonts.
Updating the mime types in sniffer to reflect the new changes.
Fixes #24524
Change-Id: Iba6cef4c5974e9930e14705720d42550ee87ba56
Reviewed-on: https://go-review.googlesource.com/102458
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/net/http/sniff_test.go')
| -rw-r--r-- | src/net/http/sniff_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/net/http/sniff_test.go b/src/net/http/sniff_test.go index 1aaa54181a..b9e9488610 100644 --- a/src/net/http/sniff_test.go +++ b/src/net/http/sniff_test.go @@ -58,13 +58,13 @@ var sniffTests = []struct { // Font types. // {"MS.FontObject", []byte("\x00\x00")}, - {"TTF sample I", []byte("\x00\x01\x00\x00\x00\x17\x01\x00\x00\x04\x01\x60\x4f"), "application/font-ttf"}, - {"TTF sample II", []byte("\x00\x01\x00\x00\x00\x0e\x00\x80\x00\x03\x00\x60\x46"), "application/font-ttf"}, + {"TTF sample I", []byte("\x00\x01\x00\x00\x00\x17\x01\x00\x00\x04\x01\x60\x4f"), "font/ttf"}, + {"TTF sample II", []byte("\x00\x01\x00\x00\x00\x0e\x00\x80\x00\x03\x00\x60\x46"), "font/ttf"}, - {"OTTO sample I", []byte("\x4f\x54\x54\x4f\x00\x0e\x00\x80\x00\x03\x00\x60\x42\x41\x53\x45"), "application/font-off"}, + {"OTTO sample I", []byte("\x4f\x54\x54\x4f\x00\x0e\x00\x80\x00\x03\x00\x60\x42\x41\x53\x45"), "font/otf"}, - {"woff sample I", []byte("\x77\x4f\x46\x46\x00\x01\x00\x00\x00\x00\x30\x54\x00\x0d\x00\x00"), "application/font-woff"}, - {"woff2 sample", []byte("\x77\x4f\x46\x32\x00\x01\x00\x00\x00"), "application/font-woff2"}, + {"woff sample I", []byte("\x77\x4f\x46\x46\x00\x01\x00\x00\x00\x00\x30\x54\x00\x0d\x00\x00"), "font/woff"}, + {"woff2 sample", []byte("\x77\x4f\x46\x32\x00\x01\x00\x00\x00"), "font/woff2"}, } func TestDetectContentType(t *testing.T) { |
