[要約] RFC 2397は、データURLスキームについての仕様を定義しており、データを直接URLに埋め込むことを可能にします。この仕様の目的は、データのインライン表示やデータの埋め込みを容易にすることです。

Network Working Group                                      L. Masinter
Request for Comments: 2397                           Xerox Corporation
Category: Standards Track                                  August 1998
        

The "data" URL scheme

「データ」URLスキーム

Status of this Memo

本文書の状態

This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.

このドキュメントは、インターネットコミュニティのインターネット標準トラックプロトコルを指定し、改善のための議論と提案を要求します。このプロトコルの標準化状態とステータスについては、「インターネット公式プロトコル標準」(STD 1)の最新版を参照してください。このメモの配布は無制限です。

Copyright Notice

著作権表示

Copyright (C) The Internet Society (1998). All Rights Reserved.

Copyright(C)The Internet Society(1998)。全著作権所有。

1. Abstract
1. 概要

A new URL scheme, "data", is defined. It allows inclusion of small data items as "immediate" data, as if it had been included externally.

新しいURLスキーム「データ」が定義されています。小さなデータ項目を、「外部」に含まれているかのように、「即時」データとして含めることができます。

2. Description
2. 説明

Some applications that use URLs also have a need to embed (small) media type data directly inline. This document defines a new URL scheme that would work like 'immediate addressing'. The URLs are of the form:

URLを使用する一部のアプリケーションでは、(小さな)メディアタイプデータを直接インラインで埋め込む必要もあります。このドキュメントでは、「即時アドレッシング」のように機能する新しいURLスキームを定義しています。 URLの形式は次のとおりです。

                    data:[<mediatype>][;base64],<data>
        

The <mediatype> is an Internet media type specification (with optional parameters.) The appearance of ";base64" means that the data is encoded as base64. Without ";base64", the data (as a sequence of octets) is represented using ASCII encoding for octets inside the range of safe URL characters and using the standard %xx hex encoding of URLs for octets outside that range. If <mediatype> is omitted, it defaults to text/plain;charset=US-ASCII. As a shorthand, "text/plain" can be omitted but the charset parameter supplied.

<mediatype>は、インターネットメディアタイプの仕様です(オプションのパラメーターを使用)。 "; base64"の表記は、データがbase64としてエンコードされていることを意味します。 「; base64」を使用しない場合、データは(オクテットのシーケンスとして)安全なURL文字の範囲内のオクテットにはASCIIエンコーディングを使用し、その範囲外のオクテットにはURLの標準の%xx 16進エンコーディングを使用して表されます。 <mediatype>を省略すると、デフォルトでtext / plain; charset = US-ASCIIになります。省略形として、「text / plain」は省略できますが、charsetパラメータが指定されています。

The "data:" URL scheme is only useful for short values. Note that some applications that use URLs may impose a length limit; for example, URLs embedded within <A> anchors in HTML have a length limit determined by the SGML declaration for HTML [RFC1866]. The LITLEN (1024) limits the number of characters which can appear in a single attribute value literal, the ATTSPLEN (2100) limits the sum of all lengths of all attribute value specifications which appear in a tag, and the TAGLEN (2100) limits the overall length of a tag.

"data:" URLスキームは、短い値にのみ役立ちます。 URLを使用する一部のアプリケーションでは、長さの制限が課される場合があることに注意してください。たとえば、HTMLの<A>アンカー内に埋め込まれたURLには、HTMLのSGML宣言によって決定される長さ制限があります[RFC1866]。 LITLEN(1024)は単一の属性値リテラルに出現できる文字数を制限し、ATTSPLEN(2100)はタグに出現するすべての属性値仕様のすべての長さの合計を制限し、TAGLEN(2100)はタグの全長。

The "data" URL scheme has no relative URL forms.

「データ」URLスキームには、相対URLフォームはありません。

3. Syntax
3. 構文
       dataurl    := "data:" [ mediatype ] [ ";base64" ] "," data
       mediatype  := [ type "/" subtype ] *( ";" parameter )
       data       := *urlchar
       parameter  := attribute "=" value
        

where "urlchar" is imported from [RFC2396], and "type", "subtype", "attribute" and "value" are the corresponding tokens from [RFC2045], represented using URL escaped encoding of [RFC2396] as necessary.

ここで、「urlchar」は[RFC2396]からインポートされ、「type」、「subtype」、「attribute」、および「value」は[RFC2045]からの対応するトークンであり、必要に応じて[RFC2396]のURLエスケープエンコーディングを使用して表されます。

Attribute values in [RFC2045] are allowed to be either represented as tokens or as quoted strings. However, within a "data" URL, the "quoted-string" representation would be awkward, since the quote mark is itself not a valid urlchar. For this reason, parameter values should use the URL Escaped encoding instead of quoted string if the parameter values contain any "tspecial".

[RFC2045]の属性値は、トークンまたは引用符付きの文字列として表すことができます。ただし、「データ」URL内では、引用符自体が有効なurlcharではないため、「引用文字列」表現は扱いにくいものになります。このため、パラメーター値に「tspecial」が含まれている場合、パラメーター値は引用符付き文字列ではなくURLエスケープエンコーディングを使用する必要があります。

The ";base64" extension is distinguishable from a content-type parameter by the fact that it doesn't have a following "=" sign.

"; base64"拡張子は、後続の "="記号がないため、コンテンツタイプパラメータと区別できます。

4. Examples
4. 例

A data URL might be used for arbitrary types of data. The URL

データURLは、任意のタイプのデータに使用される可能性があります。 URL

data:,A%20brief%20note

データ:、A%20brief%20note

encodes the text/plain string "A brief note", which might be useful in a footnote link.

脚注リンクに役立つテキスト/プレーン文字列「簡単なメモ」をエンコードします。

The HTML fragment:

HTMLフラグメント:

<IMG SRC="data:image/gif;base64,R0lGODdhMAAwAPAAAAAAAP///ywAAAAAMAAw AAAC8IyPqcvt3wCcDkiLc7C0qwyGHhSWpjQu5yqmCYsapyuvUUlvONmOZtfzgFz ByTB10QgxOR0TqBQejhRNzOfkVJ+5YiUqrXF5Y5lKh/DeuNcP5yLWGsEbtLiOSp a/TPg7JpJHxyendzWTBfX0cxOnKPjgBzi4diinWGdkF8kjdfnycQZXZeYGejmJl ZeGl9i2icVqaNVailT6F5iJ90m6mvuTS4OK05M0vDk0Q4XUtwvKOzrcd3iq9uis F81M1OIcR7lEewwcLp7tuNNkM3uNna3F2JQFo97Vriy/Xl4/f1cf5VWzXyym7PH hhx4dbgYKAAA7" ALT="Larry"> could be used for a small inline image in a HTML document. (The embedded image is probably near the limit of utility. For anything else larger, data URLs are likely to be inappropriate.)

<IMG SRC = "データ:画像/ GIF、BASE64、R0lGODdhMAAwAPAAAAAAAP /// ywAAAAAMAAw AAAC8IyPqcvt3wCcDkiLc7C0qwyGHhSWpjQu5yqmCYsapyuvUUlvONmOZtfzgFz ByTB10QgxOR0TqBQejhRNzOfkVJ + 5YiUqrXF5Y5lKh / DeuNcP5yLWGsEbtLiOSp A / TPg7JpJHxyendzWTBfX0cxOnKPjgBzi4diinWGdkF8kjdfnycQZXZeYGejmJl ZeGl9i2icVqaNVailT6F5iJ90m6mvuTS4OK05M0vDk0Q4XUtwvKOzrcd3iq9uis F81M1OIcR7lEewwcLp7tuNNkM3uNna3F2JQFo97Vriy / XL4 / f1cf5VWzXyym7PH hhx4dbgYKAAA7" ALT = "ラリーは">に小さなインライン画像を使用することができますHTMLドキュメント。 (埋め込まれた画像は、おそらくユーティリティの限界に近いでしょう。それ以上の場合、データURLは不適切である可能性があります。)

A data URL scheme's media type specification can include other parameters; for example, one might specify a charset parameter.

データURLスキームのメディアタイプ仕様には、他のパラメーターを含めることができます。たとえば、charsetパラメータを指定できます。

      data:text/plain;charset=iso-8859-7,%be%fg%be
        

can be used for a short sequence of greek characters.

ギリシャ文字の短いシーケンスに使用できます。

Some applications may use the "data" URL scheme in order to provide setup parameters for other kinds of networking applications. For example, one might create a media type application/vnd-xxx-query

一部のアプリケーションは、他の種類のネットワーキングアプリケーションにセットアップパラメータを提供するために、「データ」URLスキームを使用する場合があります。たとえば、メディアタイプapplication / vnd-xxx-queryを作成できます。

whose content consists of a query string and a database identifier for the "xxx" vendor's databases. A URL of the form:

そのコンテンツは、「xxx」ベンダーのデータベースのクエリ文字列とデータベース識別子で構成されています。次の形式のURL:

data:application/vnd-xxx-query,select_vcount,fcol_from_fieldtable/local

data:application / vnd-xxx-query、select_vcount、fcol_from_fieldtable / local

could then be used in a local application to launch the "helper" for application/vnd-xxx-query and give it the immediate data included.

次に、ローカルアプリケーションで使用して、application / vnd-xxx-queryの「ヘルパー」を起動し、すぐに含まれるデータを提供できます。

5. History
5. 歴史

This idea was originally proposed August 1995. Some versions of the data URL scheme have been used in the definition of VRML, and a version has appeared as part of a proposal for embedded data in HTML. Various changes have been made, based on requests, to elide the media type, pack the indication of the base64 encoding more tightly, and eliminate "quoted printable" as an encoding since it would not easily yield valid URLs without additional %xx encoding, which itself is sufficient. The "data" URL scheme is in use in VRML, new applications of HTML, and various commercial products. It is being used for object parameters in Java and ActiveX applications.

このアイデアは1995年8月に最初に提案されました。データURLスキームのいくつかのバージョンがVRMLの定義に使用されており、バージョンはHTMLに埋め込まれたデータの提案の一部として登場しました。リクエストに基づいて、メディアタイプを除外し、base64エンコーディングの表示をより厳密にパックし、エンコーディングとしての "quoted printable"を排除するために、%xxエンコーディングを追加しないと有効なURLを簡単に生成できないため、さまざまな変更が行われました。それ自体で十分です。 「データ」URLスキームは、VRML、HTMLの新しいアプリケーション、およびさまざまな商用製品で使用されています。 JavaおよびActiveXアプリケーションのオブジェクトパラメータに使用されています。

6. Security
6. 安全保障

Interpretation of the data within a "data" URL has the same security considerations as any implementation of the given media type. An application should not interpret the contents of a data URL which is marked with a media type that has been disallowed for processing by the application's configuration.

「データ」URL内のデータの解釈には、特定のメディアタイプの実装と同じセキュリティ上の考慮事項があります。アプリケーションは、アプリケーションの構成による処理が許可されていないメディアタイプでマークされたデータURLのコンテンツを解釈しないでください。

Sites which use firewall proxies to disallow the retrieval of certain media types (such as application script languages or types with known security problems) will find it difficult to screen against the inclusion of such types using the "data" URL scheme. However, they should be aware of the threat and take whatever precautions are considered necessary within their domain.

ファイアウォールプロキシを使用して特定のメディアタイプ(アプリケーションスクリプト言語や既知のセキュリティ問題のあるタイプなど)の取得を禁止しているサイトでは、「データ」URLスキームを使用してそのようなタイプを含めないようにスクリーニングするのは難しいでしょう。ただし、脅威を認識し、ドメイン内で必要と考えられる予防策を講じる必要があります。

The effect of using long "data" URLs in applications is currently unknown; some software packages may exhibit unreasonable behavior when confronted with data that exceeds its allocated buffer size.

アプリケーションで長い「データ」URLを使用した場合の影響は現時点では不明です。一部のソフトウェアパッケージは、割り当てられたバッファサイズを超えるデータに直面すると、不合理な動作をする場合があります。

7. References
7. 参考文献

[RFC2396] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifiers (URI): Generic Syntax", RFC 2396, August 1998.

[RFC2396] Berners-Lee、T.、Fielding、R。、およびL. Masinter、「Uniform Resource Identifiers(URI):Generic Syntax」、RFC 2396、1998年8月。

[RFC1866] Berners-Lee, T., and D. Connolly, "Hypertext Markup Language - 2.0.", RFC 1866, November 1995.

[RFC1866] Berners-Lee、T。、およびD. Connolly、「Hypertext Markup Language-2.0。」、RFC 1866、1995年11月。

[RFC2045] Freed N., and N. Borenstein., "Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies", RFC 2045, November 1996.

[RFC2045] Freed N.およびN. Borenstein。、「Multipurpose Internet Mail Extensions(MIME)Part One:Format of Internet Message Bodys」、RFC 2045、1996年11月。

Author contact information:

著者連絡先情報:

Larry Masinter Xerox Palo Alto Research Center 3333 Coyote Hill Road Palo Alto, CA 94304

Larry Masinter Xerox Palo Alto Research Center 3333 Coyote Hill Road Palo Alto、CA 94304

   EMail: masinter@parc.xerox.com
        

Full Copyright Statement

完全な著作権表示

Copyright (C) The Internet Society (1998). All Rights Reserved.

Copyright(C)The Internet Society(1998)。全著作権所有。

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.

このドキュメントとその翻訳はコピーして他のユーザーに提供することができ、コメントまたはその他の方法で説明したり、その実装を支援する二次的著作物は、いかなる種類の制限なしに、全体または一部を準備、コピー、公開、および配布することができますただし、上記の著作権表示とこの段落は、そのようなすべてのコピーと派生物に含まれています。ただし、このドキュメント自体は、著作権に関する通知を削除したり、インターネットソサエティや他のインターネット組織への参照を削除したりするなど、いかなる方法でも変更できません。ただし、インターネット標準を開発する目的で必要な場合は除きます。インターネット標準のプロセスに従うか、または必要に応じて、それを英語以外の言語に翻訳する必要があります。

The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.

上記で付与された制限付きのアクセス許可は永続的であり、インターネットソサエティまたはその後継者または譲受人によって取り消されることはありません。

This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

このドキュメントとここに含まれる情報は「現状有姿」で提供され、インターネット社会およびインターネット技術タスクフォースは、明示または黙示を問わず、ここに記載されている情報の使用が保証するものに限定されないいかなる保証も含め、一切の保証を否認します。商品性または特定の目的への適合性に関する権利または黙示の保証を侵害すること。