sniffed type

MIME sniffing (Web)

[54] MIME sniffing は、ファイル内容の一部を使って MIME型を決定する操作です。

仕様書

文脈

[61] fetch の結果 MIME sniffing が行われる場面については、 fetch を参照。

[62] その他に、 createImageBitmapBlob の場合にも、rules for sniffing images specifically が行われます。

[103] かつては WidgetsMIME型の決定でも参照されていました。

プロトコル

sniffing 手法の選択

[51] 応答算出MIME型 (computed MIME type) は、 MIME type sniffing algorithm により次のように決定されます >>50

  1. [142] no-sniff flag を、応答に関する no-sniff flag に設定します。
  2. [63] check-for-apache-bug flag を、 応答supplied MIME type detection algorithm の結果に設定します。
  3. [69] null か、 MIME type portionunknown/unknown, application/unknown, */* のいずれかの場合: rules for identifying an unknown MIME type
    1. [82] sniff-scriptable flag を、 no-sniff flag否定に設定します。
    2. [115] sniff-scriptable flagの場合、
      1. [128] 条件を、「未知」に設定します。
    3. [129] それ以外の場合、
      1. [130] 条件を、「未知 (no-sniff flag)」に設定します。
  4. [53] それ以外で、 no-sniff flagの場合、
    1. [97] 条件を、「no-sniff flag」に設定します。
  5. [98] それ以外で、 check-for-apache-bug flagの場合: rules for distinguishing if a resource is text or binary
    1. [116] 条件を、「check-for-apache-bug flag」に設定します。
  6. [105] それ以外で、 XML MIME型の場合、
    1. [106] 条件を、「XML MIME型」に設定します。
  7. [107] それ以外で、 MIME type portiontext/html の場合、
    1. [117] 条件を、「text/html」に設定します。
  8. [108] それ以外で、利用者エージェントの対応する画像型の場合、
    1. [118] 条件を、「画像型」に設定します。
  9. [111] それ以外で、利用者エージェントの対応する音声または動画型の場合、
    1. [119] 条件を、「音声または動画型」に設定します。
  10. [204] それ以外の場合、
    1. [205] 条件を、「その他」に設定します。
  11. [124] 条件を、についての表 (>>127) の「対象」が「全」で「条件」条件に設定します。
  12. [126] 応答について条件の sniffing (>>125) を実行した結果を返します。

[133] object 要素では、 応答について次のようにします >>132

  1. [143] no-sniff flag を、応答に関する no-sniff flag に設定します。
  2. [144] を、応答supplied MIME type detection algorithm の結果に設定します。
  3. [135] null の場合、
    1. [134] sniff-scriptable flag を、 no-sniff flag否定に設定します。
    2. [145] sniff-scriptable flagの場合、
      1. [146] 条件を、「未知」に設定します。
    3. [147] それ以外の場合、
      1. [148] 条件を、「未知 (no-sniff flag)」に設定します。
  4. [136] それ以外の場合、
    1. [137] MIME type portiontext/plain の場合、
      1. [138] 条件を、「text/plain」に設定します。
    2. [141] それ以外の場合、
      1. [139] 条件を、「その他」に設定します。
  5. [140] 条件を、についての表 (>>127) の「対象」が「object」で「条件」条件に設定します。
  6. [149] 応答について条件の sniffing (>>125) を実行した結果を返します。

[131] 応答について rules for sniffing images specifically は、次のようにします >>50

  1. [150] を、応答supplied MIME type detection algorithm の結果に設定します。
  2. [151] XML MIME型の場合、
    1. [152] 条件を、「XML MIME型」に設定します。
  3. [153] それ以外の場合、
    1. [154] 条件を、「その他」に設定します。
  4. [155] 条件を、についての表 (>>127) の「対象」が「画像型」で「条件」条件に設定します。
  5. [156] 応答について条件の sniffing (>>125) を実行した結果を返します。

[157] 応答について rules for sniffing audio and video specifically は、次のようにします >>50

  1. [158] を、応答supplied MIME type detection algorithm の結果に設定します。
  2. [159] XML MIME型の場合、
    1. [160] 条件を、「XML MIME型」に設定します。
  3. [161] それ以外の場合、
    1. [162] 条件を、「その他」に設定します。
  4. [163] 条件を、についての表 (>>127) の「対象」が「音声・動画」で「条件」条件に設定します。
  5. [164] 応答について条件の sniffing (>>125) を実行した結果を返します。

[165] 応答について rules for sniffing fonts specifically は、次のようにします >>50

  1. [166] を、応答supplied MIME type detection algorithm の結果に設定します。
  2. [167] XML MIME型の場合、
    1. [168] 条件を、「XML MIME型」に設定します。
  3. [169] それ以外の場合、
    1. [170] 条件を、「その他」に設定します。
  4. [171] 条件を、についての表 (>>127) の「対象」が「フォント」で「条件」条件に設定します。
  5. [172] 応答について条件の sniffing (>>125) を実行した結果を返します。

[191] 応答についてテキストトラックのsniffing は、次のようにします (仕様書なし: >>190 参照)。

  1. [192] を、応答supplied MIME type detection algorithm の結果に設定します。
  2. [193] XML MIME型の場合、
    1. [194] 条件を、「XML MIME型」に設定します。
  3. [195] それ以外の場合、
    1. [196] 条件を、「その他」に設定します。
  4. [197] 条件を、についての表 (>>127) の「対象」が「テキストトラック」で「条件」条件に設定します。
  5. [198] 応答について条件の sniffing (>>125) を実行した結果を返します。
[127] 実施する sniffing の種別 (「場面」は最初に一致したものが該当)
target
対象
context
条件
scriptable
scriptable
non-scriptable
非 scriptable
bom
BOM
feed or HTML
feed or HTML
image
画像
audio or video
音声・動画
archive
書庫
font
フォント
texttrack
テキストトラック
binary
バイナリー
default
既定値
target
context
未知 (no-sniff flag)
non-scriptable
bom
image
audio or video
archive
binary
default
text/plain
target
context
未知
scriptable
non-scriptable
bom
image
audio or video
archive
binary
default
text/plain
target
context
check-for-apache-bug flag
bom
binary
default
text/plain
target
context
no-sniff flag
default
target
context
XML MIME型
default
target
context
text/html
feed or HTML
target
context
画像型
image
default
target
context
音声または動画型
audio or video
default
target
context
その他
default
target
画像
context
XML MIME型
default
target
画像
context
その他
image
default
target
音声・動画
context
XML MIME型
default
target
音声・動画
context
その他
audio or video
default
target
フォント
context
XML MIME型
default
target
フォント
context
その他
font
default
target
テキストトラック
context
XML MIME型
default
target
テキストトラック
context
その他
texttrack
default
target
object
context
なし (no-sniff flag)
non-scriptable
bom
image
audio or video
archive
binary
default
text/plain
target
object
context
なし
scriptable
non-scriptable
bom
image
audio or video
archive
binary
default
text/plain
target
object
context
text/plain
bom
binary
default
text/plain
target
object
context
その他
default

[199] 他に、古典スクリプトのfetchCSS (奇癖モード)、 cache manifest ではMIME型の指定があっても無視されます。 (内容の検査は行いません。) cache manifest については HTML Standard に将来他の MIME型が必要になれば sniffing することになるだろうとの注記があります (が、 AppCache廃止されつつあるので、今後もなさそうです)。

sniffing

[125] 応答について条件の sniffing は、次のようにします。

  1. [173] 条件の「scriptable」が適用される場合、
  2. [174] 条件の「非 scriptable」が適用される場合、
  3. [203] 条件の「BOM」が「○」の場合、
  4. [175] 条件の「BOM」が「☆」の場合、
  5. [176] 条件の「feed or HTML」が適用される場合、
  6. [177] 条件の「画像」が適用される場合、
    1. [109] 結果null でない場合、
      1. [110] 結果を返し、ここで停止します。
  7. [178] 条件の「音声・動画」が適用される場合、
    1. [112] 結果null でない場合、
      1. [113] 結果を返し、ここで停止します。
  8. [179] 条件の「書庫」が適用される場合、
    1. [120] 結果null でない場合、
      1. [121] 結果を返し、ここで停止します。
  9. [180] 条件の「フォント」が適用される場合、
    1. [181] 結果null でない場合、
      1. [182] 結果を返し、ここで停止します。
  10. [200] 条件の「テキストトラック」が適用される場合 仕様書なし
    1. 先頭6バイトが WEBVTT なら、 text/vtt
    2. [201] 結果null でない場合、
      1. [202] 結果を返し、ここで停止します。
  11. [183] 条件の「バイナリー」が適用される場合、
    1. binary data bytes を含む場合、
      1. [123] application/octet-stream を返し、ここで停止します。
  12. [184] 条件の「既定値」を返します。

関連

[25] Web 以外における MIME型sniffing については、 sniffing の項を参照。

[263] 関連: text/*

歴史

[55] IE は古くから Content-Type: ヘッダーを一部無視して拡張子を使ったり sniffing したりしており、それによって他の Webブラウザーと異なる解釈をしたり、 それによって (本来の仕様上は問題ないはずのもので) セキュリティー上の問題を引き起こしたりして非難されていました。 しかし間違った Content-Type: を送出する起源鯖も広く存在しており、 また他のブラウザーも scriptContent-Type: を無視したり、 img では sniffing を行ったりしていて、 sniffing を排除することは最早できない状況でした。

[247] IEtext/plain であってもHTMLタグらしきものが含まれている時 HTML とみなす場合がありました。

[248] IE は特定の条件を満たす text/html文書XML構文解析器で処理していました。

[56] そうはいっても各 Webブラウザーが独自に異なる sniffing を行って標準仕様が存在しない状況では、 サーバー側でセキュリティー上の問題を回避するための十分な対策を施すのも困難 (何をもって十分としてよいかすらわからない状態) でありました。

Web Applications 1.0

[57] 2007年頃になってようやく Ian Hickson によって WHATWG Web Applications 1.0 (後の HTML5、 現在の HTML Standard) で Webブラウザーが実装するべき sniffing の規則が正確かつ詳細に規定されるようになりました。

[189] 当初は Content-Encoding: ヘッダーの有無も結果に影響していましたが、 削除されました。

IETF

[58] その後 IETFW3C の圧力によって sniffingHTML5 仕様書から切り離され、 この分野の専門家である Adam Barth による Internet Draft として IETF で出版されるようになりました。


[71] RFC 7231 は、 Content-Type: ヘッダーが無い場合に sniffing を認めています >>72。それ以外でも sniffing が行われる現実も認めた上で、実装によって解釈が異なることはセキュリティー上のリスクであるとし、 sniffing を無効にするオプションの提供を推奨 (encourage) しています >>72

[73] 任意に利用者が有効にしたり無効にしたりできるのも、危険だと思うのですが・・・。

[81] HTTP/0.9 でも、sniffing拡張子による推測が認められています >>80

[1] 葉っぱ日記 - 「拡張子ではなく、内容によってファイルを開くこと」の拡張子は Content-Type ではないことに注意 (2007-04-04 15:46:35 +09:00 版) http://d.hatena.ne.jp/hasegawayosuke/20070404/p1 (名無しさん 2007-04-04 23:46:23 +00:00)

[2] Re: Proposed Design Principles updated (Ian Hickson 著, 2007-04-05 14:51:37 +09:00 版) http://lists.w3.org/Archives/Public/public-html/2007Apr/0232.html

One browser started ignoring CSS files in one very specific case, namely only if the document had a DOCTYPE that, at the time, was basically unused. (I was one of the two people pushing for this.) It broke some sites, but comparatively few in the grand scheme of things. (Though we still get bug reports about this today, so maybe it wasn't that good an idea after all.)

(名無しさん)

[3] Mime sniffing data (Adam Barth <whatwg@...> 著, 版) http://permalink.gmane.org/gmane.org.w3c.whatwg.discuss/15882

[207] Content Sniffing Data (as of September 26, 2008) () http://crypto.stanford.edu/~abarth/research/html5/content-sniffing/

[4] Content-Type Processing Model draft-abarth-mime-sniff-01 ( 版) http://webblaze.cs.berkeley.edu/2009/mime-sniff/mime-sniff.txt

[5] Sam Ruby: Mime Sniff ( 版) http://intertwingly.net/blog/2009/01/09/Mime-Sniff

[6] IRC logs: freenode / #whatwg / 20090927 ( 版) http://krijnhoetmer.nl/irc-logs/whatwg/20090927#l-135

[7] IRC logs: freenode / #whatwg / 20090927 ( 版) http://krijnhoetmer.nl/irc-logs/whatwg/20090927#l-320

[8] IRC logs: freenode / #whatwg / 20090929 ( 版) http://krijnhoetmer.nl/irc-logs/whatwg/20090929#l-357

[9] Bug 8479 – http content-type override mandatory for <object> ( 版) http://www.w3.org/Bugs/Public/show_bug.cgi?id=8479

[10] HTML5 Revision Tracker ( 版) http://html5.org/tools/web-apps-tracker?from=5041&to=5042

[11] [whatwg] Video with MIME type application/octet-stream ( ( 版)) http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2010-August/028291.html

[12] IRC logs: freenode / #whatwg / 20100825 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20100825#l-1199

[13] Speech Synthesis Markup Language (SSML) Version 1.1 ( ( 版)) http://www.w3.org/TR/2010/REC-speech-synthesis11-20100907/#lexicon_type

[14] [whatwg] Video with MIME type application/octet-stream ( 版) http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2010-December/029393.html

[15] Web Applications 1.0 r5836 Bring the spec more in line with what the browsers do for video (largely, ignoring Content-Type). This will probably be tweaked further once Adam's draft has a section dedicated to sniffing media container formats. ( ( 版)) http://html5.org/tools/web-apps-tracker?from=5835&to=5836

[16] [websec] Font sniffing ( ( 版)) http://www.ietf.org/mail-archive/web/websec/current/msg00235.html

[17] Web Applications 1.0 r5921 revert r5836 per http://lists.w3.org/Archives/Public/public-html/2011Mar/0002.html ( ( 版)) http://html5.org/tools/web-apps-tracker?from=5920&to=5921

[18] Re: Request for revert on bug 11984 ( (Ian Hickson 著, 版)) http://lists.w3.org/Archives/Public/public-html/2011Mar/0002.html

[19] IRC logs: freenode / #whatwg / 20110123 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20110123

[20] IRC logs: freenode / #whatwg / 20110124 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20110124

[21] IRC logs: freenode / #whatwg / 20110127 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20110127

[22] IRC logs: freenode / #whatwg / 20110205 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20110205#l-71

[23] Web Applications 1.0 r5979 10805 ( ( 版)) http://html5.org/tools/web-apps-tracker?from=5978&to=5979

[24] drafts/sniff.xml at master from abarth's ietf-websec - GitHub ( ( 版)) https://github.com/abarth/ietf-websec/blob/master/drafts/sniff.xml

[206] >>24404 だがその後の改訂版がここに: websec/sniff.html at master · abarth/websec () https://github.com/abarth/websec/blob/master/drafts/sniff.html

MIME Sniffing Standard

[59] しかしその作業も停滞していたことから 2012年、 Gordon P. Hemsley が引き取って再び WHATWGLiving Standard として出版されるようになりました。

[60] 同じような経緯で W3C に行った仕様書はその後 WHATWG で作業が再開された後 W3C が劣化コピーを発行し続ける例が多いですが、 IETF はそういうことはしていません。

[26] MIME Sniffing ( ( 版)) http://mimesniff.spec.whatwg.org/

[27] Web Applications 1.0 r6721 (WIP - MIMESNIFF has not yet been updated accordingly) Change the spec to use MIMESNIFF rules for text tracks instead of blindly honouring MIME types. ( ( 版)) http://html5.org/tools/web-apps-tracker?from=6720&to=6721

[190] 13995 – <track> Don't check Content-Type for <track> () https://www.w3.org/Bugs/Public/show_bug.cgi?id=13995

[28] Web Applications 1.0 r6823 Make appcache no longer check for the MIME type. ( ( 版)) http://html5.org/tools/web-apps-tracker?from=6822&to=6823

[29] Web Applications 1.0 r6826 Add warnings about media elements and track and how to determine the type and how we don't know what hte solution is. ( ( 版)) http://html5.org/tools/web-apps-tracker?from=6825&to=6826

[30] Web Applications 1.0 r6920 Remove vestiges of MIME type checking in appcache.Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=14701 ( ( 版)) http://html5.org/tools/web-apps-tracker?from=6919&to=6920

[31] Web Applications 1.0 r6990 Factor out the prescan algorithm for reuse in other specs. ( ( 版)) http://html5.org/tools/web-apps-tracker?from=6989&to=6990

[33] IRC logs: freenode / #whatwg / 20120801 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20120801#l-248

[34] Web Applications 1.0 r7360 Make a BOM override HTTP headers. ( ( 版)) http://html5.org/tools/web-apps-tracker?from=7359&to=7360

[35] IRC logs: freenode / #whatwg / 20120928 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20120928

[36] IRC logs: freenode / #whatwg / 20120928 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20120928

[37] whatwg/mimesniff ( ( 版)) https://github.com/whatwg/mimesniff

[38] [whatwg] [mimesniff] Review requested on MIME Sniffing Standard ( ( 版)) http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-November/037787.html

[40] >>39 によると Chrome は未知のMIME型の sniffing で application/x-chrome-extension にも対応しているようです。

[41] Issue 7448 - chromium - CSS and JS files with MIME Type text/plain should still apply - An open-source browser project to help move the web forward. - Google Project Hosting ( ( 版)) http://code.google.com/p/chromium/issues/detail?id=7448

[42] IRC logs: freenode / #whatwg / 20121018 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20121018#l-259

[43] IRC logs: freenode / #whatwg / 20121105 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20121105#l-755

[44] IRC logs: freenode / #whatwg / 20121109 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20121109

[45] Packaged Web Apps (Widgets) - Packaging and XML Configuration (Second Edition) ( ( 版)) http://w3c.github.com/packed-webapps/packaging/#rule-for-identifying-the-media-type-of-a-file

[46] Web Applications 1.0 r7701 Revert part of r5545 because bz changed his mind and this matches reality better. :-) ( ( 版)) http://html5.org/tools/web-apps-tracker?from=7700&to=7701

[47] Web Applications 1.0 r7701 Revert part of r5545 because bz changed his mind and this matches reality better. :-) ( ( 版)) http://html5.org/tools/web-apps-tracker?from=7700&to=7701

[48] Authoritative Metadata ( ( 版)) http://www.w3.org/2001/tag/doc/mime-respect-20130405.html

[52] Windows RSS Publisher's Guide (work-in-progress) - Microsoft RSS Blog - Site Home - MSDN Blogs ( ( 版)) http://blogs.msdn.com/b/rssteam/archive/2005/08/02/publishersguide.aspx

[88] >>52 によると IEtext/xmlフィードか判定するために sniffing しています。

[89] XSL Transformations in Mozilla FAQ | MDN ( 版) https://developer.mozilla.org/en-US/docs/XSL_Transformations_in_Mozilla_FAQ

[90] >>89 によると FirefoxIE と同様の sniffing を行っています。

[64] Bug 11984 – <video>: Figure out the story with respect to honouring Content-Type headers vs sniffing content ( ( 版)) https://www.w3.org/Bugs/Public/show_bug.cgi?id=11984

[65] IRC logs: freenode / #whatwg / 20131211 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20131211#l-870

[66] IRC logs: freenode / #whatwg / 20140121 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20140121

[67] ncsa-mosaic/CHANGES at master · alandipert/ncsa-mosaic ( ( 版)) https://github.com/alandipert/ncsa-mosaic/blob/master/CHANGES#L179

[68] ncsa-mosaic/CHANGES at master · alandipert/ncsa-mosaic ( ( 版)) https://github.com/alandipert/ncsa-mosaic/blob/master/CHANGES#L885

[70] Bug 11984 – <video>: Figure out the story with respect to honouring Content-Type headers vs sniffing content ( ( 版)) https://www.w3.org/Bugs/Public/show_bug.cgi?id=11984

[74] Tolerant HTTP Parsing ( ( 版)) http://stuff.gsnedders.com/http-parsing.html#rfc.section.B

[78] mimesniff ( ( 版)) http://news.dieweltistgarnichtso.net/bin/mimesniff.html

[79] [webappsec] Rechartering: MIME-type sniffing ( (Brad Hill 著, 版)) http://lists.w3.org/Archives/Public/public-webappsec/2014Nov/0125.html

媒体要素

[77] 媒体要素にも sniffing を適用するべきか否かは意見の対立 >>76 から長らく未決とされてきましたが、 大勢が決した2014年8月には sniffing を行うよう HTML Standard が変更されました >>75

[49] しかしテキストトラックに関しては、その後も未決のままとなっています。

[83] Part2 - browsersec - Browser Security Handbook, part 2 - Browser Security Handbook - Google Project Hosting ( 版) https://code.google.com/p/browsersec/wiki/Part2#Survey_of_content_sniffing_behaviors

[84] IRC logs: freenode / #whatwg / 20150331 ( 版) http://krijnhoetmer.nl/irc-logs/whatwg/20150331#l-397

[85] mime_util.cc - Code Search ( 版) https://code.google.com/p/chromium/codesearch#chromium/src/net/base/mime_util.cc&rcl=1427945811&l=1

[86] IRC logs: freenode / #whatwg / 20150408 ( 版) http://krijnhoetmer.nl/irc-logs/whatwg/20150408#l-380

# [10:41] <philipj> for <track> there's just no code that looks at Content-Type, at least not in Blink, if it's not WebVTT then it won't work

[87] Add MIME type whitelist for "track" (text/vtt). · whatwg/fetch@44f237a ( 版) https://github.com/whatwg/fetch/commit/44f237a3ac61c9e39561f82211e442da0e9f1638

[91] gecko-dev/nsUnknownDecoder.cpp at c01ab4a7c845716c0e5fdf1a7815ccfba3bbeb7a · mozilla/gecko-dev ( 版) https://github.com/mozilla/gecko-dev/blob/c01ab4a7c845716c0e5fdf1a7815ccfba3bbeb7a/netwerk/streamconv/converters/nsUnknownDecoder.cpp

[92] Packaged Web Apps (Widgets) - Packaging and XML Configuration (Second Edition) ( 版) http://w3c.github.io/packaged-webapps/packaging/#rule-for-identifying-the-media-type-of-a-file-0

[93] Issue 2016 - chromium - Chrome stalls XHRs in order to sniff mime-type - An open-source project to help move the web forward. - Google Project Hosting ( 版) https://code.google.com/p/chromium/issues/detail?id=2016

[94] Issue 156023 - chromium - Transfer-Encoding chunked not support on text/plain - An open-source project to help move the web forward. - Google Project Hosting ( 版) https://code.google.com/p/chromium/issues/detail?id=156023

[95] MIME Type Detection in Windows Internet Explorer (Windows) ( 版) https://msdn.microsoft.com/en-us/library/ms775147(v=vs.85).aspx

[96] How Mozilla determines MIME Types | MDN ( 版) https://developer.mozilla.org/en/docs/How_Mozilla_determines_MIME_Types

[99] Fix #305: Update spec link for "sniffed type of a resource" · whatwg/html@214c199 ( 版) https://github.com/whatwg/html/commit/214c199cbd7e709b7c15b59033f326ce8a464f2f

[100] Replace sniffed MIME type with computed MIME type · whatwg/html@2f58d1e ( 版) https://github.com/whatwg/html/commit/2f58d1eb6a5eab442a7d31716c7fed7f8eb3f16f

[101] 28100 – "sniffed MIME type" has been renamed to "computed MIME type" in mimesniff spec ( 版) https://www.w3.org/Bugs/Public/show_bug.cgi?id=28100

[102] nosniff and images · Issue #395 · whatwg/fetch () https://github.com/whatwg/fetch/issues/395

[104] 21467 - Cross site scripting through non-http servers - chromium - Monorail () https://bugs.chromium.org/p/chromium/issues/detail?id=21467

[114] HTML Standard によれば、 媒体文書内容型 (document.contentType) は算出MIME型に設定されることになっています。 Chrome では、 Content-Type:画像型が指定された場合には supplied MIME type が設定され、 Content-Type: がない場合には算出MIME型が設定されます。

[122] Fix mp3 parsing (padenot著, ) https://github.com/whatwg/mimesniff/commit/d954dab75b86df066dd4b07795a93bd11a150b1a

[186] Add an algorithm to sniff for WebM properly (padenot著, ) https://github.com/whatwg/mimesniff/commit/b03894eea2955bddb2202e29ee185e7882e178ab

[229] Chromego も、この変更を実装せず、最初の4バイトが一致すれば (EBML なら) すべて WebM とみなすようです。 一方 Gecko仕様書に近い実装になっているようです >>232

[185] Add an algorithm to sniff MP3 without ID3 (padenot著, ) https://github.com/whatwg/mimesniff/commit/998b959332e8dd372f06cfde23f48b4ed5e3567c

[234] Gecko で実装されているようです。 Chromego では実装されていないようです。

[187] Web compat does not require the Apache bug workaround to sniff beyond… (GPHemsley著, ) https://github.com/whatwg/mimesniff/commit/d7bafc16ee480a5dea4c27d60dd5272388e022ce

[188] No user agent resniffs archives that supply an archive type. (GPHemsley著, ) https://github.com/whatwg/mimesniff/commit/7e14fd221bf69c05b8584244dc04367d46d15c87

[208] go/sniff.go at master · golang/go () https://github.com/golang/go/blob/master/src/net/http/sniff.go

// DetectContentType implements the algorithm described

// at http://mimesniff.spec.whatwg.org/ to determine the

// Content-Type of the given data. It considers at most the

// first 512 bytes of data. DetectContentType always returns

// a valid MIME type: if it cannot determine a more specific one, it

// returns "application/octet-stream".

[209] Web::MIME::Sniffer () https://manakai.github.io/pod/Web/MIME/Sniffer

[210] Implement MIME sniffing · Issue #14024 · servo/servo () https://github.com/servo/servo/issues/14024

[211] Implement MIME sniffing · Issue #3144 · servo/servo () https://github.com/servo/servo/issues/3144

[212] Add context-based MIME sniffing · Issue #4183 · servo/servo () https://github.com/servo/servo/issues/4183

[213] M1456, Implement MIME sniffing initial Step by djzager · Pull Request #3766 · servo/servo () https://github.com/servo/servo/pull/3766

[214] Implemementing context-based MIME type sniffing by jdm · Pull Request #8190 · servo/servo () https://github.com/servo/servo/pull/8190

[215] fixes 4184: no-sniff and check-for-apache-bug for mime sniffing by eleweek · Pull Request #6171 · servo/servo () https://github.com/servo/servo/pull/6171

[216] Add MIME sniffing for images. · Issue #124 · Kozea/WeasyPrint () https://github.com/Kozea/WeasyPrint/issues/124

[217] bitinn/doc-sniff: A helper for combating incorrect content-type, aka a mime sniffing module for node.js () https://github.com/bitinn/doc-sniff

[218] Do content-sniffing for HTML · Issue #566 · qutebrowser/qutebrowser () https://github.com/qutebrowser/qutebrowser/issues/566

[219] net/http: sniff extra mimes could be added · Issue #13383 · golang/go () https://github.com/golang/go/issues/13383

[220] 2016 - Fetch / XHRs get stalled due to mime type sniffing - chromium - Monorail () https://bugs.chromium.org/p/chromium/issues/detail?id=2016

[221] 352250 - Files.app: Refer to mime type when collecting applications to open files on Download directory. - chromium - Monorail () https://bugs.chromium.org/p/chromium/issues/detail?id=352250

[222] 579915 - Ogg container format should be sniffed as application/ogg instead of audio/ogg. - chromium - Monorail () https://bugs.chromium.org/p/chromium/issues/detail?id=579915

[223] 536912 - doesn't load svg background image if mime type not provided in header. - chromium - Monorail () https://bugs.chromium.org/p/chromium/issues/detail?id=536912

[224] 24376 – image/svg+xml missing from image & unknown type patterns () https://www.w3.org/Bugs/Public/show_bug.cgi?id=24376

[225] 878922 - imgLoader::GetMimeTypeFromContent should support SVG images () https://bugzilla.mozilla.org/show_bug.cgi?id=878922

[226] 108310 - Detection of chrome extension files has regressed - chromium - Monorail () https://bugs.chromium.org/p/chromium/issues/detail?id=108310

[227] net/base/mime_sniffer.cc - chromium/src - Git at Google () https://chromium.googlesource.com/chromium/src/+/master/net/base/mime_sniffer.cc

[228] padenot/webm-sniff: A simple C program to sniff WebM files properly. () https://github.com/padenot/webm-sniff/

[230] MIME Sniffing - WHATWG Wiki () https://wiki.whatwg.org/wiki/MIME_Sniffing

[231] nsMediaSniffer.cpp - DXR () https://dxr.mozilla.org/mozilla-central/source/toolkit/components/mediasniffer/nsMediaSniffer.cpp

[232] nestegg.c - DXR () https://dxr.mozilla.org/mozilla-central/source/media/libnestegg/src/nestegg.c#3142

[233] mp3sniff.c - DXR () https://dxr.mozilla.org/mozilla-central/source/toolkit/components/mediasniffer/mp3sniff.c?q=%2Bfunction%3A%22mp3_sniff%28const+uint8_t+%2A%2C+long%29%22&redirect_type=single#118

[235] Speech Recognition Grammar Specification Version 1.0 () https://www.w3.org/TR/speech-grammar/#S2.2.2

[236] Fold request type into destination (annevk著, ) https://github.com/whatwg/fetch/commit/d7052e2b6d24d04caa2cea8ef664923ecdb1e35c

[237] Define a new MIME type model, parser, and serializer (annevk著, ) https://github.com/whatwg/mimesniff/commit/cc81ec48288944562c4554069da1d74a71e199fb

[238] Meta: use new WHATWG boilerplate and license (domenic著, ) https://github.com/whatwg/mimesniff/commit/ce29cfd2632c3f4d16e078471f1418513c9272f7

[239] Meta: use new WHATWG boilerplate and license by domenic · Pull Request #54 · whatwg/mimesniff () https://github.com/whatwg/mimesniff/pull/54

[240] Actions required to mitigate Speculative Side-Channel Attack techniques - The Chromium Projects () https://www.chromium.org/Home/chromium-security/ssca

[241] Site Isolation - The Chromium Projects () http://www.chromium.org/Home/chromium-security/site-isolation

[242] How to handle undocumented font mime type · Issue #27 · whatwg/mimesniff () https://github.com/whatwg/mimesniff/issues/27

[243] Support for WOFF File Format 2.0 · Issue #28 · whatwg/mimesniff () https://github.com/whatwg/mimesniff/issues/28

[244] Update font types list and sniffing by domenic · Pull Request #57 · whatwg/mimesniff () https://github.com/whatwg/mimesniff/pull/57

[245] Editorial: tweak MIME type group definitions (domenic著, ) https://github.com/whatwg/mimesniff/commit/452938939d1d88e3c74f59f41f14579249130437

[246] Editorial: tweak MIME type group definitions by domenic · Pull Request #59 · whatwg/mimesniff () https://github.com/whatwg/mimesniff/pull/59

[249] Meltdown/Spectre  |  Web  |  Google Developers () https://developers.google.com/web/updates/2018/02/meltdown-spectre

[250] Invitation to attend upcoming IETF meetings · Issue #58 · whatwg/meta () https://github.com/whatwg/meta/issues/58

[251] IETF HTML5 Meeting March 2009 - W3C Wiki () https://www.w3.org/wiki/IETF_HTML5_Meeting_March_2009

[252] Review Draft Publication: July 2018 (annevk著, ) https://github.com/whatwg/mimesniff/commit/0d2601893af87ab6ba7adce04d16750f86afed91

[253] Review Draft Publication: July 2018 by annevk · Pull Request #73 · whatwg/mimesniff () https://github.com/whatwg/mimesniff/pull/73

[254] MIME Sniffing Standard Review Draft July 2018 () https://mimesniff.spec.whatwg.org/review-drafts/2018-07/

[255] Enforce strict MIME type checks for worker-imported scripts (mikewest著, ) https://github.com/whatwg/html/commit/d1c3679934f52450666750464effb97e14f555e0

[256] No longer render resources requested via FTP (mikewest著, ) https://github.com/whatwg/fetch/commit/c6b3a750f811cb4f628def0313ac317d9dcec88a

[257] Review Draft Publication: January 2019 (annevk著, ) https://github.com/whatwg/mimesniff/commit/5aa48d4bdde1524770a44d29613e994c502e4f65

[258] Review Draft Publication: January 2019 by annevk · Pull Request #94 · whatwg/mimesniff () https://github.com/whatwg/mimesniff/pull/94

[259] MIME Sniffing Standard Review Draft January 2019 () https://mimesniff.spec.whatwg.org/review-drafts/2019-01/

[260] Review Draft Publication: July 2019 (annevk著, ) https://github.com/whatwg/mimesniff/commit/c538bec2b8324a14546671f729cece1f1740c7d1

[261] Review Draft Publication: July 2019 by annevk · Pull Request #109 · whatwg/mimesniff () https://github.com/whatwg/mimesniff/pull/109

[262] MIME Sniffing Standard Review Draft July 2019 () https://mimesniff.spec.whatwg.org/review-drafts/2019-07/