3. MIME 头字段
MIME 定义了一些新的 RFC 822 头字段, 用于描述 MIME entity (MIME 实体) 的内容. 这些头字段至少出现在两种上下文中:
- 作为常规 RFC 822 消息头的一部分
- 在 multipart 构造中的 MIME body part 头部内
这些头字段的形式化定义如下:
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: 指定内容的 media type
- Content-Transfer-Encoding: 指定编码方法
- Content-ID: 内容的唯一标识符
- Content-Description: 内容的文本描述
- MIME-extension-field: 扩展字段
要点:
- Entity headers 可以出现在消息头或 body part 头中
- 在 body part 中, 不以 "content-" 开头的字段可能没有已定义含义
- 应忽略头字段的顺序