sniffing

sniffing

[53] データのバイト列を検査してそのMIME型などを決定することを、sniffing といいます。

MIME sniffing (Web)

[1] Web では、 MIME sniffing によって MIME型が決定されます。

MIME sniffing 参照。

符号化 sniffing (Web)

[69] encoding sniffing (charset sniffing) は、 バイト列からその符号化を推定するアルゴリズムです。

[4] charset sniffing アルゴリズム
[2] まとめと比較は復号器を参照。

特別な記述を検出する手法

[3]

file(1)

[5] file(1) 参照。

MIME magic

[97] 多くのプラットフォームMIME magic などと称するツールがあります。 これは、ファイルの先頭のバイト列から MIME型を推定するものです。

MIME magic 参照。

JSON の BOM sniffing

[25] RFC 4627JSONcharset sniffing について言及しています。

JSON 参照。

RDFa 処理器の Sniffing

[50] RDFa 1.1 に基づく RDFa処理器は、 MIME型によってホスト言語を決定しなければなりませんMIME型を決定できないか未対応の時は、 application/xml としなければなりません>>49

[51] >>50 の直後にこれと矛盾する次のような「NOTE」があります。 MIME型が無い時、 DOCTYPE根要素拡張子利用者定義の引数など追加の仕組みを用いても構いません >>49

IPP の Sniffing

[82] RFC 2911 - Internet Printing Protocol/1.1: Model and Semantics ( 版) https://tools.ietf.org/html/rfc2911#section-4.1.9.1

One special type is 'application/octet-stream'. If the Printer object supports this value, the Printer object MUST be capable of auto-sensing the format of the document data using an implementation-dependent method that examines some number of octets of the document data, either as part of the create operation and/or at document processing time.

関連

[6] ファイル形式も参照。

[7] browser sniffing も参照。

メモ

[8] Editorial: further cleanup "abort these steps" (shreyateeza著, ) https://github.com/whatwg/html/commit/99e2cdfc484c2ff14cbf5c38b859f4d6da17e64c

[9] rouge/lib/rouge/guessers at master · jneen/rouge () https://github.com/jneen/rouge/tree/master/lib/rouge/guessers