什么是媒体类型(AKA MIME)模板?

What is a media type (AKA MIME) Template?

根据 iana.org,除了其中 17 种之外,所有媒体类型都有模板,没有模板的媒体类型是 gifjpegmpegQCELP, ief, external-body, partial, rfc822, mesh, vrml, alternative, digest, mixedparallelenrichedplainrichtext . 模板是什么?为什么其他人没有?

The template itself is inside RFC 6838 - §5.6。它只是一个带有占位符的纯文本文档,由注册人(需要 MIME 注册的人或组织)填写并提交给 IANA。

最初提交的注册表格 IANA.org Media Types Page link 中的“模板”列。

我同意在这种情况下使用术语“模板”感觉用词不当,因为它们实际上 link 到 填写的表格 ,而不是 空白模板.


至于为什么有些格式没有模板,我猜主要有3种可能:

  1. 该格式及其在 Internet 上的使用早于 IANA 注册系统,我 推测 IANA 添加了当时遇到的常见媒体类型的注册。 GIF 和 JPEG 很可能就是这种情况,它们都可以追溯到 1980 年代。
  2. 该格式是在 RFC 6838 发布后注册的,这似乎反对提交模板表单的做法。
  3. 有些格式是 IANA 和 RFC 系统本身的一部分 - 向自己提交模板表单是愚蠢的。

  • 媒体类型页面引用了 RFC 6838(右上角),它包含新注册的说明和程序:

Procedures for registering Media Types can be found in [RFC6838], [RFC4289], and [RFC6657].

  • 最初注册程序在RFC2048中提到使用模板(强调我的):

2.3 - Registration Procedure

The following procedure has been implemented by the IANA for review and approval of new media types. [...] For registrations in the vendor or personal tree, the initial review step described below may be omitted and the type registered directly by submitting the template and an explanation( directly to IANA (at iana@iana.org).

4.10 - Publication Requirements

[...] Such specifications MUST contain an appropriate media type registration template taken from Section 10. [...]

  • 奇怪的是,RFC6838(取代了 RFC4288)不再描述使用模板,但模板仍然包含在 RFC 中。不过,我承认我没有足够详细地阅读 RFC6838,无法准确地告诉您新程序是什么。