summaryrefslogtreecommitdiffstats
path: root/net/base/mime_sniffer_unittest.cc
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-08 07:13:44 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-08 07:13:44 +0000
commit344128dc6d961ef925071050cd360c09c7310488 (patch)
treef7844fd41ee30c8f123b8a6d93c6b1523cc2139c /net/base/mime_sniffer_unittest.cc
parentccf7d64a4fa04ac14d4cc3060eac4f5e80413422 (diff)
downloadchromium_src-344128dc6d961ef925071050cd360c09c7310488.zip
chromium_src-344128dc6d961ef925071050cd360c09c7310488.tar.gz
chromium_src-344128dc6d961ef925071050cd360c09c7310488.tar.bz2
Optimize the mime sniffer based on UMA data and move closer to the HTML 5 spec.
Removed over 50% of the heuristics while returning the same result 99.996% of the time. Each heuristic we remove reduces the attack surface that honest sites have to worry about when the serve third-party content. Patch by Adam Barth R=darin git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2997 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/mime_sniffer_unittest.cc')
-rw-r--r--net/base/mime_sniffer_unittest.cc3
1 files changed, 0 insertions, 3 deletions
diff --git a/net/base/mime_sniffer_unittest.cc b/net/base/mime_sniffer_unittest.cc
index a3416e0..0ed87e8 100644
--- a/net/base/mime_sniffer_unittest.cc
+++ b/net/base/mime_sniffer_unittest.cc
@@ -101,9 +101,6 @@ TEST(MimeSnifferTest, MozillaCompatibleTest) {
{ "BMjlakdsfk", sizeof("BMjlakdsfk")-1,
"http://www.example.com/foo",
"", "image/bmp" },
- { "\x00\x00\x20\x00", sizeof("\x00\x00\x30\x00")-1,
- "http://www.example.com/favicon",
- "", "image/x-icon" },
{ "\x00\x00\x30\x00", sizeof("\x00\x00\x30\x00")-1,
"http://www.example.com/favicon.ico",
"", "application/octet-stream" },