Network Working Group                                       B. Hoehrmann
Request for Comments: 4329                                    April 2006
Category: Informational
        
Network Working Group                                       B. Hoehrmann
Request for Comments: 4329                                    April 2006
Category: Informational
        

Scripting Media Types

脚本媒体类型

Status of This Memo

关于下段备忘

This memo provides information for the Internet community. It does not specify an Internet standard of any kind. Distribution of this memo is unlimited.

本备忘录为互联网社区提供信息。它没有规定任何类型的互联网标准。本备忘录的分发不受限制。

Copyright Notice

版权公告

Copyright (C) The Internet Society (2006).

版权所有(C)互联网协会(2006年)。

Abstract

摘要

This document describes the registration of media types for the ECMAScript and JavaScript programming languages and conformance requirements for implementations of these types.

本文档描述了ECMAScript和JavaScript编程语言的媒体类型注册以及这些类型实现的一致性要求。

Table of Contents

目录

   1. Introduction ....................................................2
   2. Conformance and Document Conventions ............................2
   3. Deployed Scripting Media Types and Compatibility ................2
   4. Character Encoding Scheme Handling ..............................4
      4.1. Charset Parameter ..........................................4
      4.2. Character Encoding Scheme Detection ........................4
      4.3. Character Encoding Scheme Error Handling ...................6
   5. Security Considerations .........................................6
   6. IANA Considerations .............................................8
   7. JavaScript Media Types ..........................................9
      7.1. text/javascript (obsolete) .................................9
      7.2. application/javascript ....................................10
   8. ECMAScript Media Types .........................................11
      8.1. text/ecmascript (obsolete) ................................11
      8.2. application/ecmascript ....................................12
   9. References .....................................................13
      9.1. Normative References ......................................13
      9.2. Informative References ....................................13
        
   1. Introduction ....................................................2
   2. Conformance and Document Conventions ............................2
   3. Deployed Scripting Media Types and Compatibility ................2
   4. Character Encoding Scheme Handling ..............................4
      4.1. Charset Parameter ..........................................4
      4.2. Character Encoding Scheme Detection ........................4
      4.3. Character Encoding Scheme Error Handling ...................6
   5. Security Considerations .........................................6
   6. IANA Considerations .............................................8
   7. JavaScript Media Types ..........................................9
      7.1. text/javascript (obsolete) .................................9
      7.2. application/javascript ....................................10
   8. ECMAScript Media Types .........................................11
      8.1. text/ecmascript (obsolete) ................................11
      8.2. application/ecmascript ....................................12
   9. References .....................................................13
      9.1. Normative References ......................................13
      9.2. Informative References ....................................13
        
1. Introduction
1. 介绍

This memo describes media types for the JavaScript and ECMAScript programming languages. Refer to "Brief History" and "Overview" in [ECMA] for background information on these languages.

本备忘录描述了JavaScript和ECMAScript编程语言的媒体类型。有关这些语言的背景信息,请参阅[ECMA]中的“简要历史记录”和“概述”。

Programs written in these programming languages have historically been interchanged using inapplicable, experimental, and unregistered media types. This document defines four of the most commonly used media types for such programs to reflect this usage in the IANA media type registry, to foster interoperability by defining underspecified aspects, and to provide general security considerations.

用这些编程语言编写的程序在历史上一直使用不适用的、实验性的和未注册的媒体类型进行交换。本文档定义了此类程序最常用的四种媒体类型,以反映IANA媒体类型注册表中的使用情况,通过定义未指定的方面来促进互操作性,并提供一般安全注意事项。

2. Conformance and Document Conventions
2. 一致性和文档约定

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14, [RFC2119] and indicate requirement levels for compliant implementations. Requirements apply to all implementations unless otherwise stated.

本文件中的关键词“必须”、“不得”、“要求”、“应”、“不应”、“应”、“不应”、“建议”、“可”和“可选”应按照BCP 14、[RFC2119]中的描述进行解释,并指出合规实施的要求级别。除非另有说明,否则要求适用于所有实现。

An implementation is a software module that supports one of the media types defined in this document. Software modules may support multiple media types but conformance is considered individually for each type.

实现是支持本文档中定义的一种媒体类型的软件模块。软件模块可能支持多种媒体类型,但每种类型的一致性都要单独考虑。

Implementations that fail to satisfy one or more "MUST" requirements are considered non-compliant. Implementations that satisfy all "MUST" requirements, but fail to satisfy one or more "SHOULD" requirements, are said to be "conditionally compliant". All other implementations are "unconditionally compliant".

未能满足一个或多个“必须”要求的实现被视为不符合要求。满足所有“必须”要求,但未能满足一个或多个“应该”要求的实现称为“有条件兼容”。所有其他实现都是“无条件兼容的”。

3. Deployed Scripting Media Types and Compatibility
3. 部署的脚本媒体类型和兼容性

Various unregistered media types have been used in an ad-hoc fashion to label and exchange programs written in ECMAScript and JavaScript. These include:

各种未注册的媒体类型已经以一种特殊的方式被用来标记和交换用ECMAScript和JavaScript编写的程序。这些措施包括:

      +-----------------------------------------------------+
      | text/javascript          | text/ecmascript          |
      | text/javascript1.0       | text/javascript1.1       |
      | text/javascript1.2       | text/javascript1.3       |
      | text/javascript1.4       | text/javascript1.5       |
      | text/jscript             | text/livescript          |
      | text/x-javascript        | text/x-ecmascript        |
      | application/x-javascript | application/x-ecmascript |
      | application/javascript   | application/ecmascript   |
      +-----------------------------------------------------+
        
      +-----------------------------------------------------+
      | text/javascript          | text/ecmascript          |
      | text/javascript1.0       | text/javascript1.1       |
      | text/javascript1.2       | text/javascript1.3       |
      | text/javascript1.4       | text/javascript1.5       |
      | text/jscript             | text/livescript          |
      | text/x-javascript        | text/x-ecmascript        |
      | application/x-javascript | application/x-ecmascript |
      | application/javascript   | application/ecmascript   |
      +-----------------------------------------------------+
        

Use of the "text" top-level type for this kind of content is known to be problematic. This document thus defines text/javascript and text/ ecmascript but marks them as "obsolete". Use of experimental and unregistered media types, as listed in part above, is discouraged. The media types,

已知对此类内容使用“文本”顶级类型存在问题。因此,本文定义了text/javascript和text/ecmascript,但将它们标记为“过时”。不鼓励使用上面第部分列出的实验性和未注册的介质类型。媒体类型,

* application/javascript * application/ecmascript

* 应用程序/javascript*应用程序/ecmascript

which are also defined in this document, are intended for common use and should be used instead.

本文件中也对其进行了定义,仅供通用,应改用。

This document defines equivalent processing requirements for the types text/javascript, text/ecmascript, and application/javascript. Use of and support for the media type application/ecmascript is considerably less widespread than for other media types defined in this document. Using that to its advantage, this document defines stricter processing rules for this type to foster more interoperable processing.

本文档定义了text/javascript、text/ecmascript和application/javascript类型的等效处理要求。与本文档中定义的其他媒体类型相比,媒体类型应用程序/ecmascript的使用和支持要少得多。利用这一优势,本文档为这种类型定义了更严格的处理规则,以促进更具互操作性的处理。

The types defined in this document are applicable to scripts written in [JS15] and [ECMA], respectively, as well as to scripts written in a compatible language or profile such as [EcmaCompact].

本文档中定义的类型分别适用于以[JS15]和[ECMA]编写的脚本,以及以兼容语言或配置文件(如[EcmaCompact])编写的脚本。

This document does not address scripts written in other languages. In particular, future versions of JavaScript, future editions of [ECMA], and extensions to [ECMA], such as [E4X], are not directly addressed. This document may be updated to take other content into account.

本文档不涉及以其他语言编写的脚本。特别是,JavaScript的未来版本、[ECMA]的未来版本以及[ECMA]的扩展(如[E4X])没有直接解决。本文件可能会更新,以考虑其他内容。

Updates of this document may introduce new optional parameters; implementations MUST consider the impact of such an update. For the application/ecmascript media type, implementations MUST NOT process content labeled with a "version" parameter as if no such parameter had been specified; this is typically achieved by treating the content as unsupported. This error handling behavior allows extending the definition of the media type for content that cannot be processed by implementations of [ECMA].

本文件的更新可能会引入新的可选参数;实现必须考虑这种更新的影响。对于应用程序/ecmascript媒体类型,实现不能处理标有“版本”参数的内容,就像没有指定此类参数一样;这通常是通过将内容视为不受支持来实现的。此错误处理行为允许扩展[ECMA]实现无法处理的内容的媒体类型定义。

The programming languages defined in [JS15] and [ECMA] share a common subset. Choice of a type for scripts compatible with both languages is out of the scope of this document.

[JS15]和[ECMA]中定义的编程语言共享一个公共子集。为两种语言兼容的脚本选择一种类型超出了本文档的范围。

This document does not define how fragment identifiers in resource identifiers ([RFC3986], [RFC3987]) for documents labeled with one of

本文档未定义如何在资源标识符([RFC3986]、[RFC3987])中为标有以下内容之一的文档定义片段标识符:

the media types defined in this document are resolved. An update of this document may define processing of fragment identifiers.

将解析此文档中定义的媒体类型。本文件的更新可定义片段标识符的处理。

4. Character Encoding Scheme Handling
4. 字符编码方案处理

Refer to [RFC3536] for a discussion of terminology used in this section. Source text (as defined in [ECMA], section 6) can be binary source text. Binary source text is a textual data object that represents source text encoded using a character encoding scheme. A textual data object is a whole text protocol message or a whole text document, or a part of it, that is treated separately for purposes of external storage and retrieval. An implementation's internal representation of source text and source text are not considered binary source text.

有关本节中使用的术语的讨论,请参阅[RFC3536]。源文本(如[ECMA]第6节所定义)可以是二进制源文本。二进制源文本是表示使用字符编码方案编码的源文本的文本数据对象。文本数据对象是全文协议消息或全文文档,或其中的一部分,为了外部存储和检索的目的而单独处理。实现的源文本内部表示形式和源文本不被视为二进制源文本。

Implementations need to determine a character encoding scheme in order to decode binary source text to source text. The media types defined in this document allow an optional charset parameter to explicitly specify the character encoding scheme used to encode the source text.

实现需要确定字符编码方案,以便将二进制源文本解码为源文本。本文档中定义的媒体类型允许可选的字符集参数显式指定用于编码源文本的字符编码方案。

How implementations determine the character encoding scheme can be subject to processing rules that are out of the scope of this document. For example, transport protocols can require that a specific character encoding scheme is to be assumed if the optional charset parameter is not specified, or they can require that the charset parameter is used in certain cases. Such requirements are not considered part of this document.

实现如何确定字符编码方案可能受到超出本文档范围的处理规则的约束。例如,如果未指定可选的charset参数,则传输协议可能要求假定特定的字符编码方案,或者可能要求在某些情况下使用charset参数。此类要求不被视为本文件的一部分。

Implementations that support binary source text MUST support binary source text encoded using the UTF-8 [RFC3629] character encoding scheme. Other character encoding schemes MAY be supported. Use of UTF-8 to encode binary source text is encouraged but not required.

支持二进制源文本的实现必须支持使用UTF-8[RFC3629]字符编码方案编码的二进制源文本。可能支持其他字符编码方案。鼓励使用UTF-8编码二进制源文本,但不是必需的。

4.1. Charset Parameter
4.1. 字符集参数

The charset parameter provides a means to specify the character encoding scheme of binary source text. Its value MUST match the mime-charset production defined in [RFC2978], section 2.3, and SHOULD be a registered charset [CHARSETS]. An illegal value is a value that does not match that production.

charset参数提供了一种指定二进制源文本的字符编码方案的方法。其值必须与[RFC2978]第2.3节中定义的mime字符集产品相匹配,并且应该是注册的字符集[CHARSETS]。非法值是与该产品不匹配的值。

4.2. Character Encoding Scheme Detection
4.2. 字符编码方案检测

It is possible that implementations cannot interoperably determine a single character encoding scheme simply by complying with all requirements of the applicable specifications. To foster interoperability in such cases, the following algorithm is defined.

实现可能无法仅通过遵守适用规范的所有要求来互操作地确定单个字符编码方案。为了促进这种情况下的互操作性,定义了以下算法。

Implementations apply this algorithm until a single character encoding scheme is determined.

实现应用此算法,直到确定单字符编码方案。

1. If a charset parameter with a legal value is specified, the value determines the character encoding scheme.

1. 如果指定了具有合法值的字符集参数,则该值将确定字符编码方案。

2. If the binary source text starts with a Unicode encoding form signature, the signature determines the encoding. The following octet sequences, at the very beginning of the binary source text, are considered with their corresponding character encoding schemes:

2. 如果二进制源文本以Unicode编码形式签名开头,则签名确定编码。在二进制源文本的最开始处,考虑以下八位字节序列及其相应的字符编码方案:

          +------------------+----------+
          | Leading sequence | Encoding |
          +------------------+----------+
          | FF FE 00 00      | UTF-32LE |
          | 00 00 FE FF      | UTF-32BE |
          | FF FE            | UTF-16LE |
          | FE FF            | UTF-16BE |
          | EF BB BF         | UTF-8    |
          +------------------+----------+
        
          +------------------+----------+
          | Leading sequence | Encoding |
          +------------------+----------+
          | FF FE 00 00      | UTF-32LE |
          | 00 00 FE FF      | UTF-32BE |
          | FF FE            | UTF-16LE |
          | FE FF            | UTF-16BE |
          | EF BB BF         | UTF-8    |
          +------------------+----------+
        

The longest matching octet sequence determines the encoding. Implementations of this step MUST use these octet sequences to determine the character encoding scheme, even if the determined scheme is not supported. If this step determines the character encoding scheme, the octet sequence representing the Unicode encoding form signature MUST be ignored when decoding the binary source text to source text.

最长匹配的八位字节序列确定编码。此步骤的实现必须使用这些八位字节序列来确定字符编码方案,即使所确定的方案不受支持。如果此步骤确定字符编码方案,则在将二进制源文本解码为源文本时,必须忽略表示Unicode编码形式签名的八位字节序列。

3. The character encoding scheme is determined to be UTF-8.

3. 字符编码方案被确定为UTF-8。

If the character encoding scheme is determined to be UTF-8 through any means other than step 2 as defined above and the binary source text starts with the octet sequence EF BB BF, the octet sequence is ignored when decoding the binary source text to source text. (The sequence will also be ignored if step 2 determines the character encoding scheme per the requirements in step 2).

如果通过除上述步骤2以外的任何方式确定字符编码方案为UTF-8,并且二进制源文本以八位字节序列EF BB BF开始,则在将二进制源文本解码为源文本时忽略八位字节序列。(如果步骤2根据步骤2中的要求确定字符编码方案,则序列也将被忽略)。

In the cited case, implementations of the types text/javascript, text/ecmascript, and application/javascript SHOULD and implementations of the type application/ecmascript MUST implement the requirements defined in this section.

在所引用的案例中,text/javascript、text/ecmascript和application/javascript类型的实现应该满足,而application/ecmascript类型的实现必须满足本节中定义的要求。

4.3. Character Encoding Scheme Error Handling
4.3. 字符编码方案错误处理

The following error processing behavior is RECOMMENDED for the media types text/javascript, text/ecmascript, and application/javascript, and REQUIRED for the media type application/ecmascript.

以下错误处理行为建议用于媒体类型text/javascript、text/ecmascript和application/javascript,而对于媒体类型application/ecmascript则是必需的。

o If the value of a charset parameter is illegal, implementations MUST either recover from the error by ignoring the parameter or consider the character encoding scheme unsupported.

o 如果字符集参数的值是非法的,则实现必须通过忽略参数或考虑不支持的字符编码方案来恢复错误。

o If binary source text is determined to have been encoded using a certain character encoding scheme that the implementation is unable to process, implementations MUST consider the resource unsupported (i.e., they MUST NOT decode the binary source text using a different character encoding scheme).

o 如果确定二进制源文本已使用某个实现无法处理的字符编码方案进行编码,则实现必须考虑不支持的资源(即,它们不能使用不同的字符编码方案对二进制源文本进行解码)。

o Binary source text can be determined to have been encoded using a certain character encoding scheme but contain octet sequences that are not legal according to that scheme. This is typically caused by a lack of proper character encoding scheme information; such errors can pose a security risk, as discussed in section 5.

o 二进制源文本可以被确定为使用某个字符编码方案编码,但包含根据该方案不合法的八位字节序列。这通常是由于缺少适当的字符编码方案信息造成的;如第5节所述,此类错误可能会造成安全风险。

Implementations SHOULD detect such errors as early as possible; in particular, they SHOULD detect them before interpreting any of the source text. Implementations MUST detect such errors and MUST NOT interpret any source text after detecting such an error. Such errors MAY be reported, e.g., as syntax errors as defined in [ECMA], section 16.

实现应尽早检测此类错误;特别是,他们应该在解释任何源文本之前检测到它们。实现必须检测到此类错误,并且在检测到此类错误后不得解释任何源文本。此类错误可能会被报告,如[ECMA]第16节中定义的语法错误。

This document does not define facilities that allow specification of the character encoding scheme used to encode binary source text in a conflicting manner. There are only two sources for character encoding scheme information: the charset parameter and the Unicode encoding form signature. If a charset parameter is specified, binary source text is processed as defined for that character encoding scheme.

本文档未定义允许以冲突方式对二进制源文本进行编码的字符编码方案的规范的设施。字符编码方案信息只有两个来源:charset参数和Unicode编码表单签名。如果指定了字符集参数,则二进制源文本将按照该字符编码方案的定义进行处理。

5. Security Considerations
5. 安全考虑

Refer to [RFC3552] for a discussion of terminology used in this section. Examples in this section and discussions of interactions of host environments with scripts and extensions to [ECMA] are to be understood as non-exhaustive and of a purely illustrative nature.

有关本节中使用的术语的讨论,请参阅[RFC3552]。本节中的示例以及主机环境与[ECMA]的脚本和扩展的交互讨论应理解为非穷举性的,纯粹是说明性的。

The programming language defined in [ECMA] is not intended to be computationally self-sufficient, rather it is expected that the computational environment provides facilities to programs to enable

[ECMA]中定义的编程语言并不打算在计算上自给自足,而是希望计算环境为程序提供便利,以实现

specific functionality. Such facilities constitute unknown factors and are thus considered out of the scope of this document.

特定功能。此类设施构成未知因素,因此不在本文件范围内。

Derived programming languages are permitted to include additional functionality that is not described in [ECMA]; such functionality constitutes an unknown factor and is thus considered out of the scope of this document. In particular, extensions to [ECMA] defined for the JavaScript programming language are not discussed in this document.

派生编程语言允许包含[ECMA]中未描述的附加功能;此类功能构成未知因素,因此不在本文件范围内。特别是,本文档不讨论为JavaScript编程语言定义的[ECMA]扩展。

Uncontrolled execution of scripts can be exceedingly dangerous. Implementations that execute scripts MUST give consideration to their application's threat models and those of the individual features they implement; in particular, they MUST ensure that untrusted content is not executed in an unprotected environment.

不受控制地执行脚本可能非常危险。执行脚本的实现必须考虑应用程序的威胁模型以及它们实现的各个特性;特别是,他们必须确保不受信任的内容不会在不受保护的环境中执行。

Specifications for host environment facilities and for derived programming languages should include security considerations. If an implementation supports such facilities, the respective security considerations apply. In particular, if scripts can be referenced from or included in specific document formats, the considerations for the embedding or referencing document format apply.

主机环境设施和派生编程语言的规范应包括安全注意事项。如果实现支持此类设施,则适用相应的安全注意事项。特别是,如果脚本可以从特定文档格式引用或包含在特定文档格式中,则嵌入或引用文档格式的注意事项适用。

For example, scripts embedded in application/xhtml+xml [RFC3236] documents could be enabled through the host environment to manipulate the document instance, which could cause the retrieval of remote resources; security considerations regarding retrieval of remote resources of the embedding document would apply in this case.

例如,可以通过主机环境启用嵌入在application/xhtml+xml[RFC3236]文档中的脚本来操作文档实例,这可能导致检索远程资源;关于检索嵌入文档的远程资源的安全考虑将适用于这种情况。

This circumstance can further be used to make information, that is normally only available to the script, available to a web server by encoding the information in the resource identifier of the resource, which can further enable eavesdropping attacks. Implementation of such facilities is subject to the security considerations of the host environment, as discussed above.

这种情况还可用于通过在资源的资源标识符中编码信息,使通常仅对脚本可用的信息对web服务器可用,这可进一步启用窃听攻击。如上所述,此类设施的实施取决于主机环境的安全考虑。

The facilities defined in [ECMA] do not include provisions for input of external data, output of computed results, or modification of aspects of the host environment. An implementation of only the facilities defined in [ECMA] is not considered to support dangerous operations.

[ECMA]中定义的设施不包括外部数据输入、计算结果输出或主机环境方面修改的规定。仅实施[ECMA]中定义的设施不被视为支持危险操作。

The programming language defined in [ECMA] does include facilities to loop, cause computationally complex operations, or consume large amounts of memory; this includes, but is not limited to, facilities that allow dynamically generated source text to be executed (e.g., the eval() function); uncontrolled execution of such features can cause denial of service, which implementations MUST protect against.

[ECMA]中定义的编程语言包括循环、导致计算复杂操作或消耗大量内存的功能;这包括但不限于允许执行动态生成的源文本的功能(例如eval()函数);不受控制地执行这些功能可能会导致拒绝服务,而实现必须防止拒绝服务。

A host environment can provide facilities to access external input. Scripts that pass such input to the eval() function or similar language features can be vulnerable to code injection attacks. Scripts are expected to protect against such attacks.

主机环境可以提供访问外部输入的工具。将此类输入传递给eval()函数或类似语言功能的脚本可能容易受到代码注入攻击。脚本预计可以防止此类攻击。

A host environment can provide facilities to output computed results in a user-visible manner. For example, host environments supporting a graphical user interface can provide facilities that enable scripts to present certain messages to the user. Implementations MUST take steps to avoid confusion of the origin of such messages. In general, the security considerations for the host environment apply in such a case as discussed above.

主机环境可以提供以用户可见的方式输出计算结果的工具。例如,支持图形用户界面的主机环境可以提供使脚本能够向用户呈现特定消息的功能。实现必须采取措施避免混淆这些消息的来源。通常,主机环境的安全注意事项适用于上述情况。

Implementations are required to support the UTF-8 character encoding scheme; the security considerations of [RFC3629] apply. Additional character encoding schemes may be supported; support for such schemes is subject to the security considerations of those schemes.

实现需要支持UTF-8字符编码方案;[RFC3629]的安全注意事项适用。可能支持其他字符编码方案;对这些计划的支持取决于这些计划的安全考虑。

Source text is expected to be in Unicode Normalization Form C. Scripts and implementations MUST consider security implications of unnormalized source text and data. For a detailed discussion of such implications refer to the security considerations in [RFC3629].

源文本预期是Unicode规范化形式C。脚本和实现必须考虑非规范源文本和数据的安全含义。有关此类影响的详细讨论,请参阅[RFC3629]中的安全注意事项。

Scripts can be executed in an environment that is vulnerable to code injection attacks. For example, a CGI script [RFC3875] echoing user input could allow the inclusion of untrusted scripts that could be executed in an otherwise trusted environment. This threat scenario is subject to security considerations that are out of the scope of this document.

脚本可以在易受代码注入攻击的环境中执行。例如,响应用户输入的CGI脚本[RFC3875]可允许包含可在其他受信任环境中执行的不受信任脚本。此威胁场景受到不在本文档范围内的安全考虑的影响。

The "data" resource identifier scheme [RFC2397], in combination with the types defined in this document, could be used to cause execution of untrusted scripts through the inclusion of untrusted resource identifiers in otherwise trusted content. Security considerations of [RFC2397] apply.

“数据”资源标识符方案[RFC2397]与本文档中定义的类型相结合,可用于通过在其他受信任内容中包含不受信任的资源标识符来执行不受信任的脚本。[RFC2397]的安全注意事项适用。

Implementations can fail to implement a specific security model or other means to prevent possibly dangerous operations. Such failure could possibly be exploited to gain unauthorized access to a system or sensitive information; such failure constitutes an unknown factor and is thus considered out of the scope of this document.

实现可能无法实现特定的安全模型或其他方法来防止可能的危险操作。此类故障可能被利用来获得对系统或敏感信息的未经授权访问;此类故障构成未知因素,因此不在本文件范围内。

6. IANA Considerations
6. IANA考虑

This document registers four new media types as defined in the following sections.

本文档登记了四种新的媒体类型,如下节所述。

7. JavaScript Media Types
7. JavaScript媒体类型
7.1. text/javascript (obsolete)
7.1. text/javascript(过时)

Type name: text Subtype name: javascript Required parameters: none Optional parameters: charset, see section 4.1. Encoding considerations: The same as the considerations in section 3.1 of [RFC3023].

类型名称:文本子类型名称:javascript必需参数:无可选参数:字符集,请参见第4.1节。编码注意事项:与[RFC3023]第3.1节中的注意事项相同。

Security considerations: See section 5. Interoperability considerations: None, except as noted in other sections of this document.

安全注意事项:见第5节。互操作性注意事项:无,除非本文件其他章节另有说明。

Published specification: [JS15] Applications which use this media type: Script interpreters as discussed in this document.

已发布规范:[JS15]使用此媒体类型的应用程序:本文档中讨论的脚本解释器。

Additional information:

其他信息:

      Magic number(s):             n/a
      File extension(s):           .js
      Macintosh File Type Code(s): TEXT
        
      Magic number(s):             n/a
      File extension(s):           .js
      Macintosh File Type Code(s): TEXT
        

Person & email address to contact for further information: See Author's Address section.

联系人和电子邮件地址以了解更多信息:请参阅作者地址部分。

Intended usage: OBSOLETE Restrictions on usage: n/a Author: See Author's Address section. Change controller: The IESG.

预期用途:过时的使用限制:不适用作者:参见作者地址部分。更改控制器:IESG。

7.2. application/javascript
7.2. 应用程序/javascript

Type name: application Subtype name: javascript Required parameters: none Optional parameters: charset, see section 4.1. Encoding considerations: The same as the considerations in section 3.2 of [RFC3023].

类型名称:应用程序子类型名称:javascript必需参数:无可选参数:字符集,请参阅第4.1节。编码注意事项:与[RFC3023]第3.2节中的注意事项相同。

Security considerations: See section 5. Interoperability considerations: None, except as noted in other sections of this document.

安全注意事项:见第5节。互操作性注意事项:无,除非本文件其他章节另有说明。

Published specification: [JS15] Applications which use this media type: Script interpreters as discussed in this document.

已发布规范:[JS15]使用此媒体类型的应用程序:本文档中讨论的脚本解释器。

Additional information:

其他信息:

      Magic number(s):             n/a
      File extension(s):           .js
      Macintosh File Type Code(s): TEXT
        
      Magic number(s):             n/a
      File extension(s):           .js
      Macintosh File Type Code(s): TEXT
        

Person & email address to contact for further information: See Author's Address section.

联系人和电子邮件地址以了解更多信息:请参阅作者地址部分。

Intended usage: COMMON Restrictions on usage: n/a Author: See Author's Address section. Change controller: The IESG.

预期用途:常见用途限制:不适用作者:参见作者地址部分。更改控制器:IESG。

8. ECMAScript Media Types
8. ECMAScript媒体类型
8.1. text/ecmascript (obsolete)
8.1. 文本/ecmascript(已过时)

Type name: text Subtype name: ecmascript Required parameters: none Optional parameters: charset, see section 4.1. Encoding considerations: The same as the considerations in section 3.1 of [RFC3023].

类型名称:文本子类型名称:ecmascript必需参数:无可选参数:字符集,请参见第4.1节。编码注意事项:与[RFC3023]第3.1节中的注意事项相同。

Security considerations: See section 5. Interoperability considerations: None, except as noted in other sections of this document.

安全注意事项:见第5节。互操作性注意事项:无,除非本文件其他章节另有说明。

Published specification: [ECMA] Applications which use this media type: Script interpreters as discussed in this document.

已发布规范:[ECMA]使用此媒体类型的应用程序:本文档中讨论的脚本解释器。

Additional information:

其他信息:

      Magic number(s):             n/a
      File extension(s):           .es
      Macintosh File Type Code(s): TEXT
        
      Magic number(s):             n/a
      File extension(s):           .es
      Macintosh File Type Code(s): TEXT
        

Person & email address to contact for further information: See Author's Address section.

联系人和电子邮件地址以了解更多信息:请参阅作者地址部分。

Intended usage: OBSOLETE Restrictions on usage: n/a Author: See Author's Address section. Change controller: The IESG.

预期用途:过时的使用限制:不适用作者:参见作者地址部分。更改控制器:IESG。

8.2. application/ecmascript
8.2. 应用程序/ecmascript

Type name: application Subtype name: ecmascript Required parameters: none Optional parameters: charset, see section 4.1.

类型名称:应用程序子类型名称:ecmascript必需参数:无可选参数:字符集,请参阅第4.1节。

Note: Section 3 defines error handling behavior for content labeled with a "version" parameter.

注意:第3节定义了带有“版本”参数的内容的错误处理行为。

Encoding considerations: The same as the considerations in section 3.2 of [RFC3023].

编码注意事项:与[RFC3023]第3.2节中的注意事项相同。

Security considerations: See section 5. Interoperability considerations: None, except as noted in other sections of this document.

安全注意事项:见第5节。互操作性注意事项:无,除非本文件其他章节另有说明。

Published specification: [ECMA] Applications which use this media type: Script interpreters as discussed in this document.

已发布规范:[ECMA]使用此媒体类型的应用程序:本文档中讨论的脚本解释器。

Additional information:

其他信息:

      Magic number(s):             n/a
      File extension(s):           .es
      Macintosh File Type Code(s): TEXT
        
      Magic number(s):             n/a
      File extension(s):           .es
      Macintosh File Type Code(s): TEXT
        

Person & email address to contact for further information: See Author's Address section.

联系人和电子邮件地址以了解更多信息:请参阅作者地址部分。

Intended usage: COMMON Restrictions on usage: n/a Author: See Author's Address section. Change controller: The IESG.

预期用途:常见用途限制:不适用作者:参见作者地址部分。更改控制器:IESG。

9. References
9. 工具书类
9.1. Normative References
9.1. 规范性引用文件

[CHARSETS] IANA, "Assigned character sets", <http://www.iana.org/assignments/character-sets>.

[CHARSETS]IANA,“指定字符集”<http://www.iana.org/assignments/character-sets>.

   [ECMA]         European Computer Manufacturers Association,
                  "ECMAScript Language Specification 3rd Edition",
                  December 1999, <http://www.ecma-international.org/
                  publications/standards/Ecma-262.htm>
        
   [ECMA]         European Computer Manufacturers Association,
                  "ECMAScript Language Specification 3rd Edition",
                  December 1999, <http://www.ecma-international.org/
                  publications/standards/Ecma-262.htm>
        

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.

[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月。

[RFC2978] Freed, N. and J. Postel, "IANA Charset Registration Procedures", BCP 19, RFC 2978, October 2000.

[RFC2978]Freed,N.和J.Postel,“IANA字符集注册程序”,BCP 19,RFC 2978,2000年10月。

[RFC3023] Murata, M., St. Laurent, S., and D. Kohn, "XML Media Types", RFC 3023, January 2001.

[RFC3023]Murata,M.,St.Laurent,S.,和D.Kohn,“XML媒体类型”,RFC 3023,2001年1月。

[RFC3536] Hoffman, P., "Terminology Used in Internationalization in the IETF", RFC 3536, May 2003.

[RFC3536]Hoffman,P.,“IETF国际化中使用的术语”,RFC3536,2003年5月。

[RFC3552] Rescorla, E. and B. Korver, "Guidelines for Writing RFC Text on Security Considerations", BCP 72, RFC 3552, July 2003.

[RFC3552]Rescorla,E.和B.Korver,“关于安全考虑的RFC文本编写指南”,BCP 72,RFC 3552,2003年7月。

[RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 10646", STD 63, RFC 3629, November 2003.

[RFC3629]Yergeau,F.,“UTF-8,ISO 10646的转换格式”,STD 63,RFC 3629,2003年11月。

9.2. Informative References
9.2. 资料性引用
   [E4X]          European Computer Manufacturers Association,
                  "ECMAScript for XML (E4X)", June 2004,
                  <http://www.ecma-international.org/
                  publications/standards/Ecma-357.htm>
        
   [E4X]          European Computer Manufacturers Association,
                  "ECMAScript for XML (E4X)", June 2004,
                  <http://www.ecma-international.org/
                  publications/standards/Ecma-357.htm>
        
   [EcmaCompact]  European Computer Manufacturers Association,
                  "ECMAScript 3rd Edition Compact Profile", June 2001,
                  <http://www.ecma-international.org/
                  publications/standards/Ecma-327.htm>
        
   [EcmaCompact]  European Computer Manufacturers Association,
                  "ECMAScript 3rd Edition Compact Profile", June 2001,
                  <http://www.ecma-international.org/
                  publications/standards/Ecma-327.htm>
        

[JS15] Netscape Communications Corp., "Core JavaScript Reference 1.5", September 2000, <http://web.archive.org/*/http:// devedge.netscape.com/library/manuals/2000 /javascript/1.5/reference/>.

[JS15]网景通信公司,“核心JavaScript参考1.5”,2000年9月<http://web.archive.org/*/http://devedge.netscape.com/library/manuals/2000/javascript/1.5/reference/>。

[RFC2397] Masinter, L., "The "data" URL scheme", RFC 2397, August 1998.

[RFC2397]Masinter,L.“数据”URL方案”,RFC 2397,1998年8月。

[RFC3236] Baker, M. and P. Stark, "The 'application/xhtml+xml' Media Type", RFC 3236, January 2002.

[RFC3236]Baker,M.和P.Stark,“应用程序/xhtml+xml”媒体类型”,RFC 3236,2002年1月。

[RFC3875] Robinson, D. and K. Coar, "The Common Gateway Interface (CGI) Version 1.1", RFC 3875, October 2004.

[RFC3875]Robinson,D.和K.Coar,“公共网关接口(CGI)1.1版”,RFC 3875,2004年10月。

[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, January 2005.

[RFC3986]Berners Lee,T.,Fielding,R.,和L.Masinter,“统一资源标识符(URI):通用语法”,STD 66,RFC 3986,2005年1月。

[RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource Identifiers (IRIs)", RFC 3987, January 2005.

[RFC3987]Duerst,M.和M.Suignard,“国际化资源标识符(IRIs)”,RFC 3987,2005年1月。

Author's Address

作者地址

Bjoern Hoehrmann Weinheimer Strasse 22 Mannheim D-68309 Germany

德国曼海姆D-68309大街22号

   EMail: bjoern@hoehrmann.de
   URI:   http://bjoern.hoehrmann.de
        
   EMail: bjoern@hoehrmann.de
   URI:   http://bjoern.hoehrmann.de
        

Note: Please write "Bjoern Hoehrmann" with o-umlaut (U+00F6) wherever possible, e.g., as "Bj&#246;rn H&#246;hrmann" in HTML and XML.

注:请尽可能使用o-umlaut(U+00F6)书写“Bjoern Hoehrmann”,如HTML和XML格式的“Bj&#246;rn H&#246;hrmann”。

Full Copyright Statement

完整版权声明

Copyright (C) The Internet Society (2006).

版权所有(C)互联网协会(2006年)。

This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights.

本文件受BCP 78中包含的权利、许可和限制的约束,除其中规定外,作者保留其所有权利。

This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM 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.

本文件及其包含的信息是按“原样”提供的,贡献者、他/她所代表或赞助的组织(如有)、互联网协会和互联网工程任务组不承担任何明示或暗示的担保,包括但不限于任何保证,即使用本文中的信息不会侵犯任何权利,或对适销性或特定用途适用性的任何默示保证。

Intellectual Property

知识产权

The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79.

IETF对可能声称与本文件所述技术的实施或使用有关的任何知识产权或其他权利的有效性或范围,或此类权利下的任何许可可能或可能不可用的程度,不采取任何立场;它也不表示它已作出任何独立努力来确定任何此类权利。有关RFC文件中权利的程序信息,请参见BCP 78和BCP 79。

Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr.

向IETF秘书处披露的知识产权副本和任何许可证保证,或本规范实施者或用户试图获得使用此类专有权利的一般许可证或许可的结果,可从IETF在线知识产权存储库获取,网址为http://www.ietf.org/ipr.

The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org.

IETF邀请任何相关方提请其注意任何版权、专利或专利申请,或其他可能涵盖实施本标准所需技术的专有权利。请将信息发送至IETF的IETF-ipr@ietf.org.

Acknowledgement

确认

Funding for the RFC Editor function is provided by the IETF Administrative Support Activity (IASA).

RFC编辑器功能的资金由IETF行政支持活动(IASA)提供。