MIME 实体的通用 MIME 类型?
MIME 实体是否有通用 MIME 类型之类的东西?根据 RFC 2045/2046,MIME 实体由标头部分、空行和主体部分(以 CRLF 行结尾)组成。
一个例子如下:
Header1: Some list
Header2: of headers
Arbitrary body content
换句话说,是否有一个 MIME“超类型”用于诸如 message/rfc822、单个多部分等?
Is there such a thing as a generic MIME type for a MIME entity? A MIME entity would be something that consists of a header section, followed by a blank line, followed by a body section (with CRLF line endings) according to RFC 2045/2046.
An example could be the following:
Header1: Some list
Header2: of headers
Arbitrary body content
In other words, is there a MIME "supertype" for things such as message/rfc822, a single multipart-part, etc.?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,没有一个。单个多部分也是
message/rfc822
,从技术上讲,HTTP 消息不是 MIME 实体,因此它们和rfc822
之间没有共同基础。尽管 HTTP 消息的部分可能是 MIME 实体,但实际的请求/响应却不是。RFC2616 通过在某些地方引用 822 系列规范(有时是错误的,例如使用 RFC2047 进行参数编码的引用)来模糊区别。但是 HTTP 定义了自己的标头和值的基本产生式,这些产生式与 RFC[2]822 中定义的那些略有不同,并且不兼容。因此,不应该使用标准 RFC822 工具来解析 HTTP……甚至不考虑现实世界的 Web 浏览器和服务器与 HTTP 标准的许多很多分歧。
None I know of. A single multipart part is also
message/rfc822
, and technically HTTP messages are not MIME entities so there is no common base between them andrfc822
. Although parts of an HTTP message may be MIME entities, the actual request/response is not.RFC2616 blurs the distinction by referencing 822-family specs in places (sometimes erroneously, for example the references to using RFC2047 for encoding parameters). But HTTP defines its own basic productions for headers and values which are slightly different from — and incompatible with — those defined in RFC[2]822. So HTTP should not be parsed using standard RFC822 tools... even disregarding the many, many ways in which real-world web browsers and servers diverge from the HTTP standards.