10. Enclosing Messages as Data (将消息封装为数据)
10.1. Media Type message/http
"message/http" 媒体类型可用于封装单个 HTTP 请求或响应消息,前提是它遵守所有 "message" 类型关于行长度和编码的 MIME 限制。由于行长度限制,"message/http" 中的字段值允许使用行折叠 (obs-fold)(如第 5.2 节所述)来在多行上传达字段值。"message/http" 数据的接收方在消费消息时必须 (MUST) 用一个或多个 SP 字符替换任何过时的行折叠。
类型名称 (Type name): message
子类型名称 (Subtype name): http
必需参数 (Required parameters): N/A
可选参数 (Optional parameters): version, msgtype
-
version: 封装消息的 HTTP-version 号(例如 "1.1")。如果不存在,可以从正文的第一行确定版本。
-
msgtype: 消息类型 - "request" 或 "response"。如果不存在,可以从正文的第一行确定类型。
编码考虑 (Encoding considerations): 仅允许 "7bit"、"8bit" 或 "binary"
安全考虑 (Security considerations): 参见第 11 节
互操作性考虑 (Interoperability considerations): N/A
已发布规范 (Published specification): RFC 9112(参见第 10.1 节)
使用此媒体类型的应用程序 (Applications that use this media type): N/A
片段标识符考虑 (Fragment identifier considerations): N/A
附加信息:
- 魔术数字 (Magic number(s)): N/A
- 此类型的已弃用别名 (Deprecated alias names for this type): N/A
- 文件扩展名 (File extension(s)): N/A
- Macintosh 文件类型代码 (Macintosh file type code(s)): N/A
联系人及电子邮件地址 (Person and email address to contact for further information): 参见作者地址部分
预期用途 (Intended usage): COMMON
使用限制 (Restrictions on usage): N/A
作者 (Author): 参见作者地址部分
变更控制者 (Change controller): IESG
10.2. Media Type application/http
"application/http" 媒体类型可用于封装一个或多个 HTTP 请求或响应消息的管道(不可混合)。
类型名称 (Type name): application
子类型名称 (Subtype name): http
必需参数 (Required parameters): N/A
可选参数 (Optional parameters): version, msgtype
-
version: 封装消息的 HTTP-version 号(例如 "1.1")。如果不存在,可以从正文的第一行确定版本。
-
msgtype: 消息类型 - "request" 或 "response"。如果不存在,可以从正文的第一行确定类型。
编码考虑 (Encoding considerations): 此类型封装的 HTTP 消息采用 "binary" 格式; 通过电子邮件传输时需要使用适当的 Content-Transfer-Encoding。
安全考虑 (Security considerations): 参见第 11 节
互操作性考虑 (Interoperability considerations): N/A
已发布规范 (Published specification): RFC 9112(参见第 10.2 节)
使用此媒体类型的应用程序 (Applications that use this media type): N/A
片段标识符考虑 (Fragment identifier considerations): N/A
附加信息:
- 此类型的已弃用别名 (Deprecated alias names for this type): N/A
- 魔术数字 (Magic number(s)): N/A
- 文件扩展名 (File extension(s)): N/A
- Macintosh 文件类型代码 (Macintosh file type code(s)): N/A
联系人及电子邮件地址 (Person and email address to contact for further information): 参见作者地址部分
预期用途 (Intended usage): COMMON
使用限制 (Restrictions on usage): N/A
作者 (Author): 参见作者地址部分
变更控制者 (Change controller): IESG