Skip to main content

3. MIME Header Fields (MIME头部字段)

MIME定义了许多新的RFC 822头部字段, 用于描述MIME实体的内容. 这些头部字段至少出现在两个上下文中:

  1. 作为常规RFC 822消息头部的一部分
  2. 在多部分构造中的MIME正文部分头部中

这些头部字段的正式定义如下:

entity-headers := [ content CRLF ]
[ encoding CRLF ]
[ id CRLF ]
[ description CRLF ]
*( MIME-extension-field CRLF )

MIME-message-headers := entity-headers
fields
version CRLF
; The ordering of the header
; fields implied by this BNF
; definition should be ignored.

MIME-part-headers := entity-headers
[ fields ]
; Any field not beginning with
; "content-" can have no defined
; meaning and may be ignored.
; The ordering of the header
; fields implied by this BNF
; definition should be ignored.

各种特定MIME头部字段的语法将在以下章节中描述.


MIME头部字段列表:

  • MIME-Version: 声明MIME版本
  • Content-Type: 指定内容的媒体类型
  • Content-Transfer-Encoding: 指定编码方式
  • Content-ID: 内容的唯一标识符
  • Content-Description: 内容的文本描述
  • MIME-extension-field: 扩展字段

关键点:

  • 实体头部可以出现在消息头部或正文部分头部
  • 不以"content-"开头的字段在正文部分中可能没有定义的含义
  • 头部字段的顺序应该被忽略