Commit 84dd027a authored by ricea's avatar ricea Committed by Commit bot

Remove TODO for mime-sniffing of mpeg types.

The following TODO existed in mime_sniffer.cc since 2008:

// TODO(abarth): we don't handle partial byte matches yet
// MAGIC_NUMBER("video/mpeg", "\x00\x00\x01\xB")
// MAGIC_NUMBER("audio/mpeg", "\xFF\xE")
// MAGIC_NUMBER("audio/mpeg", "\xFF\xF")

video/mpeg is not sniffed by Firefox or IE, and is not required to be sniffed by the spec at https://mimesniff.spec.whatwg.org/.

audio/mpeg is already sniffed for the common case where the file starts with an ID3 tag. The uncommon case where it starts with "\xFF\xF." is too broad (it matches the little-endian UTF-16 byte-order-mark), and is not required by the spec.

Remove the TODO.

TEST=net_unittests
BUG=

Review URL: https://codereview.chromium.org/1138483004

Cr-Commit-Position: refs/heads/master@{#329317}
parent aa0c3c9c
......@@ -162,10 +162,6 @@ static const MagicNumber kMagicNumbers[] = {
MAGIC_NUMBER("audio/mpeg", "ID3")
MAGIC_NUMBER("image/webp", "RIFF....WEBPVP8 ")
MAGIC_NUMBER("video/webm", "\x1A\x45\xDF\xA3")
// TODO(abarth): we don't handle partial byte matches yet
// MAGIC_NUMBER("video/mpeg", "\x00\x00\x01\xB")
// MAGIC_NUMBER("audio/mpeg", "\xFF\xE")
// MAGIC_NUMBER("audio/mpeg", "\xFF\xF")
MAGIC_NUMBER("application/zip", "PK\x03\x04")
MAGIC_NUMBER("application/x-rar-compressed", "Rar!\x1A\x07\x00")
MAGIC_NUMBER("application/x-msmetafile", "\xD7\xCD\xC6\x9A")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment