Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(515)

Issue 1138483004: Remove TODO for mime-sniffing of mpeg types. (Closed)

Created:
5 years, 7 months ago by Adam Rice
Modified:
5 years, 7 months ago
Reviewers:
Ryan Sleevi
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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= Committed: https://crrev.com/84dd027af9afa68a49768dfa10fca51610575ae3 Cr-Commit-Position: refs/heads/master@{#329317}

Patch Set 1 #

Patch Set 2 : Revert changes and remove TODO. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+0 lines, -4 lines) Patch
M net/base/mime_sniffer.cc View 1 1 chunk +0 lines, -4 lines 0 comments Download

Messages

Total messages: 10 (2 generated)
Adam Rice
Alternatively I could just remove the TODO comment.
5 years, 7 months ago (2015-05-08 16:41:34 UTC) #2
Adam Rice
The pattern for audio/mpeg matches the UTF-16LE byte-order-mark. I don't know if it can be ...
5 years, 7 months ago (2015-05-08 17:30:01 UTC) #3
Ryan Sleevi
Can you please revert the whole-file formating? git cl format should only format the changed ...
5 years, 7 months ago (2015-05-08 19:30:42 UTC) #4
Adam Rice
After some additional research, I've changed the CL to just remove the TODO. Firefox and ...
5 years, 7 months ago (2015-05-11 10:59:44 UTC) #5
Ryan Sleevi
lgtm
5 years, 7 months ago (2015-05-12 01:12:07 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1138483004/20001
5 years, 7 months ago (2015-05-12 01:13:00 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 7 months ago (2015-05-12 02:11:38 UTC) #9
commit-bot: I haz the power
5 years, 7 months ago (2015-05-12 02:12:59 UTC) #10
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/84dd027af9afa68a49768dfa10fca51610575ae3
Cr-Commit-Position: refs/heads/master@{#329317}

Powered by Google App Engine
This is Rietveld 408576698