MHT 文件的内容类型

发布于 2024-07-04 15:11:37 字数 22 浏览 14 评论 0 原文

MHT 文件的内容类型是什么?

What is the content type for MHT files?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

旧伤还要旧人安 2024-07-11 15:11:37

message/rfc822

RFC 822 - ARPA 互联网文本消息格式标准

这是一个超链接: message/ rfc822

message/rfc822

RFC 822 - STANDARD FOR THE FORMAT OF ARPA INTERNET TEXT MESSAGES

Here is a hyperlink: message/rfc822

御弟哥哥 2024-07-11 15:11:37

共同撰写了 MHT 规范的 Microsoft 似乎认为它应该是 message/rfc822” rel="nofollow noreferrer">此支持页面

但规范中似乎没有给出特定的 MIME 类型:
RFC2557:聚合文档的 MIME 封装,例如 HTML (MHTML)

Microsoft, who co-authored the spec for MHT, seem to think that it should be 'message/rfc822' on this support page.

No specific MIME type seems to be given in the spec though:
RFC2557: MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)

灯下孤影 2024-07-11 15:11:37

我知道这已经很旧了,但我认为应该澄清并更详细地解释......

@Guy Starbuck 写道:

消息/rfc822

RFC 822 - ARPA 互联网短信格式标准

这个答案的问题是 MHTML 文件不是由 RFC822 定义的

MHTML 文件(.mht、.mhtml)的正确内容类型是多部分/相关

如上所述,RFC822 定义了互联网短信的格式 。 内容类型 message/rfc822 用于电子邮件中的文本附件 [1][2]。

我们大多数人可能都收到过一封电子邮件的回复,其中原始消息不是内嵌引用,而是作为附件包含在内。 该附件的内容类型为message/rfc822。 在此类电子邮件中,内容类型细分如下:

  • 多部分/混合 = 整个邮件
  • 文本/纯文本 = 回复电子邮件的文本
  • message/rfc822 = 作为附件的原始电子邮件

另一方面,正如 @feeela 所指出的,MHTML 文件定义于RFC2557。 MHTML 文件由许多不同的部分组成,每个部分可以有不同的内容类型。 然而,RFC2557 将整个文件的内容类型定义为多部分/相关

[1] RFC1341:MIME(多用途互联网邮件扩展)
[2] 消息内容类型

I know this is old, but I thought it should be clarified and explained in more detail...

@Guy Starbuck wrote:

message/rfc822

RFC 822 - STANDARD FOR THE FORMAT OF ARPA INTERNET TEXT MESSAGES

The problem with this answer is that MHTML files are not defined by RFC822.

The correct content-type for MHTML files (.mht, .mhtml) is multipart/related.

As stated above, RFC822 defines the format for internet text messages. The content-type message/rfc822 is used for text attachments within email messages [1][2].

Most of us have probably received a reply to an email where, instead of being quoted inline, the original message is included as an attachment. That attachment has a content-type of message/rfc822. In such emails, the content-types break down as follows:

  • multipart/mixed = entire message
  • text/plain = text of reply email
  • message/rfc822 = original email as attachment

On the other hand, as noted by @feeela, MHTML files are defined in RFC2557. MHTML files are comprised of many different parts, each of which can have a different content-type. However, RFC2557 defines the content-type of the entire file as multipart/related.

[1] RFC1341: MIME (Multipurpose Internet Mail Extensions)
[2] The message Content-Type

夏见 2024-07-11 15:11:37

application/octet-stream

您可以使用此内容类型并将 .mht 作为扩展名将 .eml 文件的内容流式传输到浏览器,并且电子邮件的呈现方式与电子邮件客户端中的呈现方式类似。

application/octet-stream

You can stream the contents of a .eml file to a browser with this content type and .mht as the extension, and the email will be rendered similar to the way it is rendered in an email client.

爱本泡沫多脆弱 2024-07-11 15:11:37

“聚合文档的 MIME 封装,例如 HTML”(MHTML 或 MHT)是 1999 年在 RFC 2557

其 MIME 类型为 multipart/lated,扩展名为 .mht

另请参阅:

"MIME Encapsulation of Aggregate Documents, such as HTML" (MHTML or MHT) is an IETF standard proposed in 1999 in the RFC 2557.

Its MIME type is multipart/related and the extension is .mht.

See also:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文