aboutsummaryrefslogtreecommitdiff
path: root/src/net/http/sniff_test.go
diff options
context:
space:
mode:
authorEmmanuel Odeke <odeke@ualberta.ca>2015-11-16 20:24:58 -0700
committerBrad Fitzpatrick <bradfitz@golang.org>2015-11-17 18:00:15 +0000
commit8b1152a599ea6d5f0515bcec3c5131445cc87f5c (patch)
tree252b3444b75dec2aace5cd6f310324186d4d9032 /src/net/http/sniff_test.go
parentce8f49f42ff98a87a6766aa50efa0449c4525ce3 (diff)
downloadgo-8b1152a599ea6d5f0515bcec3c5131445cc87f5c.tar.xz
net/http: add/update mp4 sniffing
Completes sniffing for mp4 signature according to the spec at: https://mimesniff.spec.whatwg.org/#signature-for-mp4 Clause 6.2.1 Fixes #8773 Change-Id: Icfc4a23324ae249db52c94a21c0e8509e1833e19 Reviewed-on: https://go-review.googlesource.com/16951 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/net/http/sniff_test.go')
-rw-r--r--src/net/http/sniff_test.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/net/http/sniff_test.go b/src/net/http/sniff_test.go
index 24ca27afc1..f04b59040f 100644
--- a/src/net/http/sniff_test.go
+++ b/src/net/http/sniff_test.go
@@ -40,9 +40,7 @@ var sniffTests = []struct {
{"GIF 87a", []byte(`GIF87a`), "image/gif"},
{"GIF 89a", []byte(`GIF89a...`), "image/gif"},
- // TODO(dsymonds): Re-enable this when the spec is sorted w.r.t. MP4.
- //{"MP4 video", []byte("\x00\x00\x00\x18ftypmp42\x00\x00\x00\x00mp42isom<\x06t\xbfmdat"), "video/mp4"},
- //{"MP4 audio", []byte("\x00\x00\x00\x20ftypM4A \x00\x00\x00\x00M4A mp42isom\x00\x00\x00\x00"), "audio/mp4"},
+ {"MP4 video", []byte("\x00\x00\x00\x18ftypmp42\x00\x00\x00\x00mp42isom<\x06t\xbfmdat"), "video/mp4"},
}
func TestDetectContentType(t *testing.T) {