[45] [DFN[[RUBY[媒体型][メディア・タイプ]@en[media type]]]]は、 [[実体]]の[[型]]です。正式には [DFN[Internet Media Type]]、 一般には [DFN[MIME [RUBYB[型]@en[type]]]]、[DFN[[RUBYB[内容型]@en[content type]]]]などと呼ばれます。 [[ファイル・システム]]における[[拡張子]]など[[ファイル]]の種類におおむね対応する概念です。 * MIME 型の一覧 [FIG[ [FIGCAPTION[ [26] [[MIME型]]の一覧 ]FIGCAPTION] ,[CODE(MIME)@en[[[*/*]]]] ,[CODE(MIME)@en[[[vnd.android.cursor.dir/[VAR[*]]]]]] ,[CODE(MIME)@en[[[app/gg]]]],[[Google Desktop]] [[gadget]],"非標準, [[IANA]] ''未''登録" ,[CODE(MIME)[[[x-application/*]]]] ,->[CODE(MIME)[application/[VAR[*]]]] ,非推奨 ,[[application/*]] ,応用一般 ,[MIME] ,[CODE(MIME)@en[[[zz-application/zz-winassoc-tgz]]]] , ,"非標準, [[IANA]] ''未''登録" ,[[audio/*]] ,音声 ,[MIME] ,[[audio-file]] , ,非標準 ,[[auth/sicily]] ,認証? ,"非標準, [[FrontPage]]" ,[[x-be2]] , ,非標準 ,[CODE(MIME)@en[[[binary/octet-stream]]]] ,[[オクテット列]] ,"非標準, [[IANA]] ''未''登録 → [CODE(MIME)@en[[[application/octet-stream]]]]" ,[[chemical/*]] , ,非標準 ,[[coloreal/embedded]] , ,非標準 ,[[x-conference/x-cooltalk]] ,[[CoolTalk]] ,[Netscape] ,[CODE(MIME)[[[x-data/xact-error]]]] ,[[database/x-unknown]] , ,非標準 ,[[default]] , ,非標準 ,[[x-device/floppy]] ,[[FD]] ,[GNOME] ,[CODE(MIME)[[[x-directory/normal]]]] ,[CODE(MIME)@en[[[document/x-epub]]]] ,[CODE(MIME)[[[drawing/x-dwf]]]] ,[[DWF]] ,非標準 ,[CODE(MIME)@en[[[dsmcc-[VAR[*]]/[VAR[*]]]]]] , ,"[[規格]], [[IANA]] ''未''登録" ,[CODE(MIME)@en[[[dsmcc-download/jpeg]]]] , ,"[[規格]], [[IANA]] ''未''登録" ,[CODE(MIME)@en[[[dsmcc-file/mpeg2-ps]]]] , ,"[[規格]], [[IANA]] ''未''登録" ,[CODE(MIME)@en[[[dsmcc-file/html]]]] , ,"[[規格]], [[IANA]] ''未''登録" ,[CODE(MIME)@en[[[dsmcc-stream/mpeg2-ts]]]] , ,"[[規格]], [[IANA]] ''未''登録" ,[CODE(MIME)@en[[[dvi]]]],,[[RFC 1049]]]] ,[CODE(MIME)@en[[[example/[VAR[*]]]]]] ,[[例]] ,"[[IETF]] [[提案標準]], [[IANA]] 登録済" ,[[x-ferrum-head/*]] ,[[x-ferrum-menu/*]] ,[CODE(MIME)[[[font/[VAR[*]]]]]] ,[[フォント]] ,非標準 → [CODE(MIME)[[[application/[VAR[*]]]]]] ,[CODE(MIME)[[[x-form/x-openscape]]]] ,[CODE(MIME)@en[[[gadget/x-googlegadget]]]],,"非標準, [[IANA]] ''未''登録" ,[CODE(MIME)[[[graphics/x-inventor]]]] ,Open Inventor 3次元 scenes ,非標準 ,[CODE(MIME)@en[[[gzip/document]]]] ,[CODE(MIME)@en[[[image/[VAR[*]]]]]] ,[CODE(MIME)@en[[[in/share]]]] ,[CODE(MIME)@en[[[inode/[VAR[*]]]]]] ,[[ファイル・システム]][[物体]] ,"非標準, [[IANA]] ''未''登録" ,[freedesktop.org] ,[[interface/x-winamp-skin]] ,[[winamp]] [[skin]] ,非標準 ,[CODE(MIME)[[[x-jigsaw/config]]]] ,[CODE(MIME)[[[x-kom/basic]]]] ,->[CODE(MIME)[[[text/x-kom-basic]]]] ,非推奨 ,[CODE(MIME)[[[x-lml/x-lml]]]] ,[CODE(MIME)@en[[[math/[VAR[*]]]]]] ,[[matter-transport/*]] ,物質転送 ,[RFC1437] ,[[mail-file]] , ,非標準 ,[CODE(MIME)@en[[[mce-text/javascript]]]] ,[[message/*]] ,メッセージ ,[MIME] ,[[mforge/x-mirage]] , ,非標準 ,[[midi/mid]] ,[[MIDI]] ,非標準 ,[CODE(MIME)[[[misc/ultravox]]]] , ,非標準 , ,[[model/*]] ,三次元空間 ,[RFC2077] ,[CODE(MIME)[[[x-model/x-mesh]]]] , ,時代遅れ ,[[mozilla.application/cached-xul]] ,[[XUL]] [[cache]] ,[Mozilla] ,[[multipart/*]] ,多部分メッセージ ,[MIME] ,[CODE(MIME)[[[x-wap.multipart/vnd.uplanet.header-set]]]] , ,[WAP] ,[CODE(MIME)[[[x-music/x-midi]]]] ,[[MIDI]] ([[SMF]]) ,非推奨 ->[CODE(MIME)[[[audio/x-midi]]]] , ,[[plugin/*]] , ,非標準 ,[CODE(MIME)[[[x-pmaildx/x-mmctrl]]]] ,[[x-postpet/*]] ,PostPet ,[CODE(MIME)@en[[[postscript]]]],,[[RFC 1049]]]] ,[[postscript-file]] , ,非標準 ,[CODE(MIME)@en[[[scribe]]]],,[[RFC 1049]]]] ,[CODE(MIME)[[[x-script/x-wfxscript]]]] ,[CODE(MIME)@en[[[sgml]]]],,[[RFC 1049]]]] ,[CODE(MIME)@en[[[x-shader/x-fragment]]]] ,[CODE(MIME)@en[[[x-shader/x-vertex]]]] ,[CODE(MIME)[[[x-squid-internal/vary]]]] ,[[x-sun-attachment]] , ,非標準 ,[[sun-deskset-message]] , ,非標準 ,[CODE(MIME)[[[x-system/x-error]]]] , ,[Namazu] ,[CODE(MIME)@en[[[tex]]]],,[[RFC 1049]]]] ,[[text/*]] ,文 ,[MIME] ,[CODE(MIME)[[[x-text-pc/ms-word]]]] ,[CODE(MIME)@en[[[troff]]]],,[[RFC 1049]]]] ,[CODE(MIME)@en[[[unknown/unknown]]]] , ,非標準 → [CODE(MIME)@en[[[application/octet-stream]]]] ,[[HTML 5]] ,[CODE(MIME)[[[x-unknown/octet-stream]]]] ,[CODE(MIME)[[[x-unknown/x-unknown]]]] ,[[vector/*]] ,vector 画像 ->[CODE(MIME)[image/[VAR[*]]]] ,非標準 ,[[video/*]] ,動画 ,[MIME] ,[[videotex/vemmi]] , ,非標準 ,[CODE(MIME)[[[x-visa-ii/x-auth]]]] ,[[windows/*]] , ,非標準 ,[CODE(MIME)[[[workbook/formulaone]]]] , ,非標準 ,[[i-world/i-vrml]] ,->[CODE(MIME)[[[model/vrml]]]] ,非標準 ,[[x-world/*]] ,->[CODE[model/[VAR[*]]]] ,非推奨 ,[CODE(MIME)@en[[[www/mime]]]] ,[[MIME]] ,"非標準, 廃止 →[CODE(MIME)@en[[[message/rfc822]]]]" ,[[libwww]] ,[CODE(MIME)@en[[[www/unknown]]]] ,未知 (自動判別) ,非標準 ,[[libwww]] ,[CODE(MIME)[[[www/source]]]] , ,非標準 , ,[CODE(MIME)@en[[[x-[VAR[*]]]]]],,[[RFC 1049]]]] ,[[xgi/*]] , ,非標準 ,[CODE(MIME)@en[[[xml/user-profile]]]],[[XUP]],"非標準, [[IANA]] ''未''登録" ]FIG] [REFS[ - [30] [IANAREG] ]REFS] * 構造化構文接尾辞 [68] [CODE(MIME)@en[[[image/svg+xml]]]] の [CODE(MIME)@en[[[+xml]]]] のように、 [[MIME型]]の末尾に [CODE[+]] と構文名がついているものは、その構文の一応用であることを表します。 この例では、 [[XML]] という構文に基づいた[[マーク付け言語]]の一種である [[SVG]] ということを表しています。このようなものを[DFN[[RUBYB[[[構造化構文接尾辞]]]@en[structured syntax suffix]]]]といいます。 詳しくはそちらの項を参照してください。 * 媒体型の命名構造 [28] RFC 2045 では媒体型は型 type と亜型 subtype を "/" で組み合わせたものと 定義されています。例: text/plain RFC 2048 は亜型に木 tree 構造を導入しました。木は枝を "." で組み合わせて 作ります。例: vnd.bigcompany.funnypictures RFC 3023 は XML の媒体型には亜型の最後に "+xml" をつけることを推奨しています。 また、あまり喜ばしくないとしながらも、将来同様のメタ型を使う時にも "+ebml" とか "+ebml+xml" とかすることを提案しています。 = media-type = type "/" subtype = type = discrete-type / composite-type = discrete-type = "text" / "image" / "audio" / "video" / "application" / extension-token = composite-type = "message" / "multipart" / extension-token = extension-token = ietf-token / x-token = subtype = ( ietf-tree / vendor-tree / personal-tree / x-tree / extension-tree / x-token ) = ietf-tree = branch meta-format = vendor-tree = "vnd." branch *("." branck) meta-format = personal-tree = "prs." branch *("." branck) meta-format = x-tree = "x." branch *("." branck) meta-format = extension-tree = branch *("." branch) meta-format = branch = 1*ttext = meta-format = *("+" format) = format = "xml" / extension-format = extension-format = 1*( ttext / "." ) = ttext = ALPHA / DIGIT / "!" / "#" / "$" / "%" / "&" / "'" / "*" / "-" / "?" / "^" / "_" / "`" / "{" / "|" / "}" / "~" * 引数 [67] [[MIME型]]の[RUBYB[[[引数]]]@en[parameter]]は、原則としてそれぞれの[[MIME型]]で定義されるものですが、 比較的多くの[[MIME型]]で共通して用いられているものや、非標準の拡張で [[MIME型]]によらずに使われているものもあります。 [FIG[ - [CODE(MIME)@en[[[capture]]]] - [CODE(MIME)@en[[[charset]]]] - [CODE(MIME)@en[[[charset-edition]]]] - [CODE(MIME)@en[[[charset-extension]]]] - [CODE(MIME)@en[[[codecs]]]] - [CODE(MIME)@en[[[name]]]] - [CODE(MIME)@en[[[profile]]]] - [CODE(MIME)@en[[[q]]]] ]FIG] * 仕様書 - RFC 1341 (廃止) - RFC 1437 matter-transport/* 媒体型 - RFC 1521 (廃止) - RFC 1590 媒体型登録手続き (廃止・・されてない) - RFC 2046 媒体型 - RFC 2048 - RFC 2077 model/* 媒体型 - RFC 2376 XML 媒体型 (廃止) - RFC 3023 XML 媒体型 - IANA 登録簿 [[#comment]] ** RFC 2046 2. Definition of a Top-Level Media Type The definition of a top-level media type consists of: 上位媒体型の定義は次のものから構成されます。 [PRE[ (1) a name and a description of the type, including criteria for whether a particular type would qualify under that type, ]PRE] (1) 型の名前と説明。特定の型をその型の下に置けるかどうかの適合基準 [PRE[ (2) the names and definitions of parameters, if any, which are defined for all subtypes of that type (including whether such parameters are required or optional), ]PRE] (2) その型のすべての亜型用に定義するパラメーターがあればその名前と定義 (そのパラメーターが必須か省略可能かを含む) [PRE[ (3) how a user agent and/or gateway should handle unknown subtypes of this type, ]PRE] (3) 利用者代理者や関門がその型の未知の亜型をどう取り扱うべきか [PRE[ (4) general considerations on gatewaying entities of this top-level type, if any, and ]PRE] (4) 必要なら、この上位型の実体の関門通過に関しての考慮一般 [PRE[ (5) any restrictions on content-transfer-encodings for entities of this top-level type. ]PRE] (5) この上位型の実体の内容転送符号化の制限 ** RFC 2046 3. Overview Of The Initial Top-Level Media Types The five discrete top-level media types are: 5つの個々上位媒体型は次の通りです。 [PRE[ (1) text -- textual information. The subtype "plain" in particular indicates plain text containing no formatting commands or directives of any sort. Plain text is intended to be displayed "as-is". No special software is required to get the full meaning of the text, aside from support for the indicated character set. Other subtypes are to be used for enriched text in forms where application software may enhance the appearance of the text, but such software must not be required in order to get the general idea of the content. Possible subtypes of "text" thus include any word processor format that can be read without resorting to software that understands the format. In particular, formats that employ embeddded binary formatting information are not considered directly readable. A very simple and portable subtype, "richtext", was defined in RFC 1341, with a further revision in RFC 1896 under the name "enriched". ]PRE] (1) text —— 文字情報。亜型 "plain" は特に、いかなる類の書式化命令・指令 を含まない平文 (plain-text) を示します。平文は「そのまま」表示する ことを意味します。文の完全な意味を得るのに、指定された文字集合への対応を 除いて特別なソフトウェアは必要ありません。他の亜型は応用ソフトウェアが 文の見た目をよくする裕福文に使われるかもしれませんが、内容の 一般的な着想を得るのにはこのようなソフトウェアは必須ではありません。 ですから "text" の亜型となりえるものにはその形式を理解するソフトウェア 無しに読むことが出来る言葉処理器 (ワード・プロセッサー) の形式を含みます。 特に、バイナリ書式付け情報を埋め込んだ形式は直接可読とは言えません。 とても単純で移植性ある亜型, "richtext" (裕福文) は RFC 1341 で定義されていましたが、 RFC 1896 で "enriched" (裕福化) という名前で 更に改訂されています。 訳注: embeddded は d が一個多い。 [PRE[ (2) image -- image data. "Image" requires a display device (such as a graphical display, a graphics printer, or a FAX machine) to view the information. An initial subtype is defined for the widely-used image format JPEG. . subtypes are defined for two widely-used image formats, jpeg and gif. ]PRE] (2) image ——画像データ。 "image" は情報を見るのに表示機器 (画像画面, 画像印刷機, FAX 機器など) が必要です。初期亜型としては 広く使われている画像形式 JPEG を定義します。。 亜型としては 2つの広く使われている画像形式, jpeg と gif を定義します。 (訳注: 誤植というか編集ミスというか。) [PRE[ (3) audio -- audio data. "Audio" requires an audio output device (such as a speaker or a telephone) to "display" the contents. An initial subtype "basic" is defined in this document. ]PRE] (3) audio ——音声データ。 "audio" は音声出力機器 (スピーカーとか電話とか) が内容を「表示」するのに必要です。初期亜型としては "basic" をこの文書で定義します。 [PRE[ (4) video -- video data. "Video" requires the capability to display moving images, typically including specialized hardware and software. An initial subtype "mpeg" is defined in this document. ]PRE] (4) video 動画データ。 "video" は動く画像を表示する能力が必要です。 典型的には特別なハードウェアとソフトウェアを含みます。 初期亜型としては "mpeg" をこの文書で定義します。 [PRE[ (5) application -- some other kind of data, typically either uninterpreted binary data or information to be processed by an application. The subtype "octet- stream" is to be used in the case of uninterpreted binary data, in which case the simplest recommended action is to offer to write the information into a file for the user. The "PostScript" subtype is also defined for the transport of PostScript material. Other expected uses for "application" include spreadsheets, data for mail-based scheduling systems, and languages for "active" (computational) messaging, and word processing formats that are not directly readable. Note that security considerations may exist for some types of application data, most notably "application/PostScript" and any form of active messaging. These issues are discussed later in this document. ]PRE] (5) appliaction 他の種類のデータ, 典型的には解釈出来ないバイナリ・データ や応用により処理される情報です。亜型 "octet-stream" は解釈出来ない バイナリ・データに使われ、この場合の最も簡単な推奨動作は情報を ファイルに書き出すと利用者に申し出ることです。 "PostScript" 亜型も PostScript 物体を転送するために定義します。他の "application" で使うべきものには表計算, 基メイル予定系統, 「動的」(計算的)メッセージの言語, 直接可読でないワード・プロセッサーの形式があります。なお、 応用データの幾つかの型, とりわけ "application/PostScript" や動的 目セージの形式には安全性について考慮すべきことがあたりします。 この問題についてはこの文書の後の方で話します。 The two composite top-level media types are: 2つの合成上位媒体型は次の通りです。 [PRE[ (1) multipart -- data consisting of multiple entities of independent data types. Four subtypes are initially defined, including the basic "mixed" subtype specifying a generic mixed set of parts, "alternative" for representing the same data in multiple formats, "parallel" for parts intended to be viewed simultaneously, and "digest" for multipart entities in which each part has a default type of "message/rfc822". ]PRE] (1) multipart 複数の独立したデータ型の実体で構成されるデータ。 4つの亜型がはじめから定義されています。 "mixed" 亜型は 一般の混成の部分の集合を示し, "alternative" は同じデータを複数の形式で 表現していることを表し, "parallel" は同時に表示されることを意図した 部分を組み合わせたもので、 "digest" は各部分の既定値が "message/rfc822" の多部分実体で構成されるものです。 [PRE[ (2) message -- an encapsulated message. A body of media type "message" is itself all or a portion of some kind of message object. Such objects may or may not in turn contain other entities. The "rfc822" subtype is used when the encapsulated content is itself an RFC 822 message. The "partial" subtype is defined for partial RFC 822 messages, to permit the fragmented transmission of bodies that are thought to be too large to be passed through transport facilities in one piece. Another subtype, "external-body", is defined for specifying large bodies by reference to an external data source. ]PRE] (2) message カプセル化メッセージ。媒体型 "message" の本文は それ自体が何らかの種類のメッセージ物体の一部又は全部です。 この物体が今度は他の実体を含むかもしれませんし、含まないかもしれません。 "rfc822" 亜型はカプセル化内容が RFC 822 メッセージである時に使います。 "partial" 亜型は RFC 822 メッセージの一部用に定義するもので、 転送機能を一片でまとめて通過させるには大き過ぎると思われる 本文を断片化して送ることが出来ます。他の亜型, "external-body" は外部データ源を使って大きな本文を示すのに定義します。 It should be noted that the list of media type values given here may be augmented in time, via the mechanisms described above, and that the set of subtypes is expected to grow substantially. 媒体型値は上述の機構でいつ増補されるかもしれませんし、 亜型の集合は本質的に増えて行くだろうことに注意して下さい。 ** RFC 2046 6. Experimental Media Type Values [PRE[ A media type value beginning with the characters "X-" is a private value, to be used by consenting systems by mutual agreement. Any format without a rigorous and public definition must be named with an "X-" prefix, and publicly specified values shall never begin with "X-". (Older versions of the widely used Andrew system use the "X-BE2" name, so new systems should probably choose a different name.) ]PRE] 文字 "X-" から始まる媒体型値は私用値で、相互の同意により同意系統で 使われます。厳密に公的に定義されていない形式は "X-" 接頭辞つきで 名前をつけなければなりませんし、公的規定値は "X-" で始めてはいけません。 (広く使われている Andrew の系統の古い版は "X-BE2" 名を使っていましたので、 新しい系統は違う名前を選ぶのがよろしいでしょう。) [PRE[ In general, the use of "X-" top-level types is strongly discouraged. Implementors should invent subtypes of the existing types whenever possible. In many cases, a subtype of "application" will be more appropriate than a new top-level type. ]PRE] 通常、 "X-" を上位型に使うのは強く非推奨です。実装者は出来る限り 既存の型の亜型をでっち上げるべきです。多くの場合、 "application" の亜型にするのが新しい上位型にするのより適切です。 ** HTTP および派生プロトコルでの扱い ***RFC 1945 (HTTP/1.0) 3.6; RFC 2068・2616 (HTTP/1.1) Media Types > HTTP uses Internet Media Types [DEL[[INS[{1945}]] [13] ]] [INS[[INS[{2616}]] [17] ]] in the Content-Type [DEL[[INS[{1945}]] header field]] ([DEL[[INS[{1945}]] Section 10.5]] [INS[section [DEL[[INS[{2068}]] 14.18]] [INS[[INS[{2616}]] 14.17]]]]) [INS[[INS[{2068,2616}]] and Accept (section 14.1) header fields]] in order to provide open and extensible data typing [INS[[INS[{2068,2616}]] and type negotiation]]. [39] [[HTTP]] は Internet [[媒体型]]を Content-Type 頭欄と Accept 頭欄において開放的で拡張可能なデータ型指定及びデータ型折衝のために使用します。 > -media-type = type "/" subtype *( ";" parameter ) -type = token -subtype = token > Parameters [DEL[may]] [INS[[INS[{2616}]] MAY]] follow the type/subtype in the form of attribute/value pairs [INS[[INS[{2616}]] (as defined in section 3.6)]]. [40] 引数が型/亜型の後に属性/値の組の形で続いても'''構いません'''。 [DEL[ >[INS[{1925,2068}]] -parameter = attribute "=" value -attribute = token -value = token | quoted-string ]DEL] > The type, subtype, and parameter attribute names are case-insensitive. Parameter values [DEL[may]] [INS[[INS[{2616}]] might]] or [DEL[may]] [INS[might]] not be case-sensitive, depending on the semantics of the parameter name. [DEL[[INS[{1945}]] LWS must not be generated]] [INS[Linear white space (LWS) MUST NOT be used]] between the type and subtype, nor between an attribute and its value. [DEL[[DEL[[INS[{1945}]] Upon receipt of a media type with an unrecognized parameter, a user agent should treat the media type as if the unrecognized parameter and its value were not present.]] [INS[[INS[{2068}]] User agents that recognize the media-type MUST process (or arrange to be processed by any external applications used to process that type/subtype by the user agent) the parameters for that MIME type as described by that type/subtype definition to the and inform the user of any problems discovered.]]]] [INS[[INS[{2616}]] The presence or absence of a parameter might be significant to the processing of a media-type, depending on its definition within the media type registry.]] [41] 型, 亜型, 引数属性名は大文字と小文字を区別しません。 引数値は、引数名の意味によって、区別するかもしれませんし区別しないかもしれません。 型及び亜型の間ならびに属性及びその値の間には線形空白 ([[LWS]]) を入れては'''なりません'''。[DEL[[DEL[認識できない引数のある媒体型を受信した際は、その認識できない引数と値は現れていないものとして取扱うべきです。]] [INS[ある [CODE(ABNF)[media-type]] を認識する[[利用者エージェント]]は、その MIME 型の引数を型・亜型定義で記述されているように処理 (あるいは利用者エージェントが型・亜型を処理するのに使う外部応用に処理させるように調整) し、問題が見つかれば利用者に知らせなければ'''なりません'''。]]]] [INS[引数の有無は、媒体型登録簿中の定義によっては、媒体型の処理に意味を持つかもしれません。]] > [INS[Note[DEL[:]] [INS[that]] some]] [DEL[[INS[{1945}]] Some]] older HTTP applications do not recognize media type parameters. [INS[When sending data to older HTTP applications, implementations]] [DEL[[INS[{1945}]] HTTP/1.0 applications]] [DEL[[INS[{1945,2068}]] should]] [INS[SHOULD]] only use media type parameters when they are [DEL[[INS[{1945}]] necessary to define the content of a message]] [INS[required by that type/subtype definition]]. [42] 古い HTTP 応用には媒体型引数を認識しないものがあることに注意してください。 古い HTTP 応用にデータを送るときには、型・亜型定義が必須としている媒体型引数だけを使う'''べきです'''。 > Media-type values are registered with the Internet Assigned Number Authority (IANA [DEL[[INS[{1945}]] [15] ]] [INS[[INS[{2616}]] [19] ]]). The media type registration process is outlined in RFC [DEL[[DEL[[DEL[1590 [13] [INS[{1945}]]]] [INS[2048 [17] [INS[{2068}]]]]]] [INS[1590 [17] [INS[{2616}]]]]]] [INS[2048 [17] [INS[{Errata}]]]]. Use of non-registered media types is discouraged. [43] 媒体型値は Internet 割当番号事務局 (IANA) で登録されます。媒体型登録過程は RFC 1590 にまとめられています。未登録の媒体型の使用は非推奨です。 **** 3.6.1; 3.6.7 Canonicalization and Text Defaults →[CODE(WikiPage)[[[text/*//正規化]]]] ****3.6.2; 3.7.2 Multipart Types →[CODE(WikiPage)[[[multipart/*]]]] ***RFC 1945 (HTTP/1.0); RFC 2068・2616 (HTTP/1.1) 7.2.1 Type > When an [DEL[Entity-Body]] [INS[entity-body]] is included with a message, the data type of that body is determined via the header fields Content-Type and Content-Encoding. These define a two-layer, ordered encoding model: メッセージに [CODE(ABNF)[[[entity-body]]]] が含まれているときには、 その[[本体]]のデータ型は頭欄 [CODE(HTTP)[[[Content-Type]]]] および [CODE(HTTP)[[[Content-Encoding]]]] により決定します。 この2つの頭欄は2層順序付き符号化模型を定義します。 > -entity-body := Content-Encoding( Content-Type( data ) ) > [DEL[A]] Content-Type specifies the media type of the underlying data. [DEL[A]] Content-Encoding may be used to indicate any additional content coding[INS[s]] applied to the [DEL[type]] [INS[data]], usually for the purpose of data compression, that [DEL[is]] [INS[are]] a property of the [DEL[resource requested]] [INS[requested resource]]. [DEL[The default for the content encoding is none (i.e., the identity function).]] [INS[There is no default encoding.]] [CODE(HTTP)[Content-Type]] はそのデータの[[媒体型]]を規定します。 [CODE(HTTP)[Content-Encoding]] は、そのデータに適用されている、 要求された[[資源]]の特性である追加の[[内容符号化]] (通常はデータ圧縮目的。) を示すのに使うことができます。 既定の符号化はありません。 > Any [DEL[HTTP/1.0]] [INS[HTTP/1.1]] message containing an entity[INS[-]]body [DEL[should]] [INS[SHOULD]] include a Content-Type header field defining the media type of that body. If and only if the media type is not given by a Content-Type [DEL[header, as is the case for Simple-Response messages]] [INS[field]], the recipient [DEL[may]] [INS[MAY]] attempt to guess the media type via inspection of its content and/or the name extension(s) of the [DEL[[INS[{1945,2068}]] URL]] [INS[[INS[{2616}]] URI]] used to identify the resource. If the media type remains unknown, the recipient [DEL[should]] [INS[SHOULD]] treat it as type "application/octet-stream". [CODE(ABNF)[[[entity-body]]] を含んだ HTTP メッセージは、 その本体の媒体型を定義する [CODE(HTTP)[Content-Type]] 頭欄を含める'''べきです'''。 媒体型が [CODE(HTTP)[Content-Type]] 頭欄で与えられていない場合[DEL[と [CODE(ABNF)[Simple-Response]] メッセージの場合]]は、 この場合に限って、受信者は内容[[及び/又は]]資源を識別するのに使う [[URI]] の名前[[拡張子]]をを調べて媒体型を推測しても'''構いません'''。 媒体型がそれでも分からない時は、受信者はその媒体を型 [CODE(MIME)[[[application/octet-stream]]]] として扱う'''べきです'''。 [INS[ 注: 注記なき変更点は 1945→2068 のもの。 ]INS] ** RFC の部分の License See [[RFCのライセンス]] * 実装 [32] [CITE[freedesktop.org - Standards/shared-mime-info-spec]] [[#comment]] * メモ - [13] >>12 禁止ではないわけだ。 実際 HTTP な世界では登録簿に無い媒体型が結構良く使われてます。 - [14] >>13 もしかしてこの注は解釈が間違ってる? 確かに未登録は非推奨とは言ってるけど、 "x-" なしのを未登録でとは言ってないな。 非推奨している「未登録媒体型」は x-媒体型のことを指してるのかもしれん。 - [16] [WEAK[2002-12-29 21:16]] ''[[名無しさん]]'': ''CVS log for gnue/gnue/common/src/GMimeTypes.py'' - [18] [[RFC1927]] Suggested Additional MIME Types for Associating Documents も幾つかの型を提案しています。 - [19] ''How to Register a Media Type with IANA (for the IETF tree)'' [[W3C]] の規格で使う媒体型を登録するための手引き。なお、 W3C の媒体型も ietf-tree に登録されます。 - [20] ''Appendix A: MIME Type Detection in Internet Explorer'' : [[M$]] の [[HTTP]] における媒体型のへたれ実装について。 - [22] [[Windoze]] では[[拡張子]]と媒体型の関連付けは、 [CODE(reg)[[[HKCR]]\.[VAR[拡張子]]\"Content Type"([[REG_SZ]])]] に値を設定することで行えます。 - [23] [[Win98]]/[[WinNT4.0]] まででは、 [[explorer]] のフォルダの設定画面の[CODE[ファイル タイプ]][[タブ]]から設定できましたが、 [[WinMe]] から初心者?にやさしい(つもりの)設定画面に変わって、媒体型の編集はまったくできなくなりました。 - [24] >>23 初心者が関連付けの設定なんかいじるのか謎ですがね。というかそもそも初心者がいじらないといけないような設計が間違ってるのであって。 - [25] [WEAK[2003-10-26 01:43:11 +00:00]] ''[[名無しさん]]'': '''' ''' [31] [CITE[A question on Media Type Registrations]] 非 [[MIME]] 型プロトコル (具体的には [[RTP]]) で媒体型を使いたいけど [[MIME]] のしがらみがうざいというのが最近 [[ietf-types]] 等々で議論になってます。 ([[名無しさん]] [sage] [WEAK[2005-06-09 00:47:27 +00:00]]) [36] [[RFC 2046]] の6章の > Any format without a rigorous and public definition must be named with an "X-" prefix, and publicly specified values shall never begin with "X-". この規定(?)に従うと、 [[RFC 2046]] で定義されている[[媒体型]]はみんな [CODE(MIME)@en[[[X-]]]] ではじめなければならなくなってしまうw ([[名無しさん]]) [37] >>36 ところが [CODE(MIME)@en[[[X-]]]] にしてしまうと後者の要件に違反してしまうw [38] >[DFN[[RUBYB[内容型]@en[content type]]]] ― Describes the content stored in a part. Content types define a media type, a subtype, and an optional set of parameters, as defined in RFC 2616. ;; [[ECMA-376]] Second Edition, Part 1, 4. [46] [CITE@en['''['''Apache-SVN''']''' Log of /httpd/httpd/trunk/docs/conf/mime.types]] ([TIME[2009-10-04 15:13:09 +09:00]] 版) [47] [CITE@en[(X)HTML5 Tracking]] ([TIME[2010-01-10 17:57:42 +09:00]] 版) [48] 「[[MIME型]]」のような用語の意味するところは曖昧です。 [49] [[Web Applications 1.0]] は「[[妥当なMIME型]]」や「[[妥当な引数なしのMIME型]]」 といった用語を [[RFC 2616]] を参照しつつ独自に規定しています。 [50] [[RFC 4287]] ([[Atom 1.0]]) は [[RFC 4288]] を参照するだけで、 [[RFC 4288]] は構文を完全には規定していないため、実際にどのような構文で記述するべきなのかがはっきりしません。 [51] [[RFC 4855]] (旧 [[RFC 3555]]) は、[[RTP]] で使うための[[MIME型]]の登録に関する規定を行っています。 [52] [CITE@ja[iモード対応HTMLタグ一覧 : (PDF関連) | サービス・機能 | NTTドコモ]] ([TIME[2010-03-20 23:46:13 +09:00]] 版) [53] [CITE@en[Registry-MIME-types - WHATWG Wiki]] ( ([TIME[2010-09-08 17:06:48 +09:00]] 版)) [54] [CITE@en[Video type parameters - WHATWG Wiki]] ( ([TIME[2011-01-27 18:22:49 +09:00]] 版)) [55] [CITE@en[Registry-MIME-types - WHATWG Wiki]] ( ([TIME[2011-01-27 07:03:43 +09:00]] 版)) [56] [CITE[IRC logs: freenode / #whatwg / 20110419]] ( ([TIME[2011-04-24 17:32:23 +09:00]] 版)) [57] [CITE@en[draft-masinter-mime-web-info-02 - MIME and the Web]] ( ([TIME[2011-08-15 00:37:20 +09:00]] 版)) [58] [CITE[IRC logs: freenode / #whatwg / 20120928]] ( ([TIME[2012-10-03 22:06:16 +09:00]] 版)) [59] [CITE@en[draft-ietf-appsawg-media-type-suffix-regs-08 - Additional Media Type Structured Syntax Suffixes]] ( ([TIME[2012-11-07 16:48:50 +09:00]] 版)) [60] [CITE[IRC logs: freenode / #whatwg / 20121105]] ( ([TIME[2012-11-24 13:19:40 +09:00]] 版)) [61] [CITE[Packaged Web Apps (Widgets) - Packaging and XML Configuration (Second Edition)]] ( ([TIME[2012-11-22 21:22:20 +09:00]] 版)) [62] [CITE[IRC logs: freenode / #whatwg / 20130326]] ( ([TIME[2013-03-30 21:50:49 +09:00]] 版)) [63] ( ([TIME[2013-04-08 19:35:49 +09:00]] 版)) [64] [CITE[IRC logs: freenode / #whatwg / 20130424]] ( ([TIME[2013-05-04 00:32:00 +09:00]] 版)) [65] [CITE[IRC logs: freenode / #whatwg / 20130507]] ( ([TIME[2013-05-16 21:22:04 +09:00]] 版)) [66] [CITE[''''''[''''''whatwg'''''']'''''' '''['''mimesniff''']''' Review request: Parsing a MIME type]] ( ([TIME[2013-06-01 02:31:20 +09:00]] 版)) [69] [CITE@en-US[XML Binding Language (XBL) 2.0]] ( ([TIME[2007-03-16 22:20:16 +09:00]] 版)) [70] [CITE@en-us[Metadata API for Media Resources 1.0]] ( ([TIME[2014-03-12 15:50:19 +09:00]] 版))