76 个字符是电子邮件 MIME 部分的长度限制 (RFC 2045) 的原因是什么? [英] What is the reason behind 76 characters being the length limit for MIME sections for Emails (RFC 2045)?

查看:27
本文介绍了76 个字符是电子邮件 MIME 部分的长度限制 (RFC 2045) 的原因是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

RFC 2045 将编码数据的最大行长度定义为 76.但是,我找不到任何解释为什么它是 76.这个数字完全是任意的,还是背后有一些原因?

RFC 2045 defines the maxmimum line length for encoded data as 76. However, I cannot find any explanation as to why it is 76. Is this number entirely arbitrary, or is there some reasoning behind it?

推荐答案

RFC2822 是EMail 的遗留标准.在 RFC2822 的 2.1.1 部分,您可以找到原因如下:它也会影响 MIME.

RFC2822 is legacy standard of EMail. In section 2.1.1 of RFC2822, you can find reason as below: It also affects MIME.

本标准对数量有两个限制一行中的字符.每行字符必须不超过998 个字符,并且应该不超过 78 个字符,不包括CRLF.

There are two limits that this standard places on the number of characters in a line. Each line of characters MUST be no more than 998 characters, and SHOULD be no more than 78 characters, excluding the CRLF.

998 个字符的限制是由于许多实现中的限制发送、接收或存储 Internet Message Format 消息根本无法在一行中处理超过 998 个字符.接收实现可以很好地处理任意大的数字为了稳健起见,一行中的字符数.然而,有这么许多实现(符合运输[RFC2821] 的要求)不接受包含更多每行超过 1000 个字符,包括 CR 和 LF,这很重要实现不创建此类消息.

The 998 character limit is due to limitations in many implementations which send, receive, or store Internet Message Format messages that simply cannot handle more than 998 characters on a line. Receiving implementations would do well to handle an arbitrarily large number of characters in a line for robustness sake. However, there are so many implementations which (in compliance with the transport requirements of [RFC2821]) do not accept messages containing more than 1000 character including the CR and LF per line, it is important for implementations not to create such messages.

比较保守的78个字符推荐是为了容纳显示这些的用户界面的许多实现可能会截断或灾难性地包装显示的消息每行超过 78 个字符,尽管这样的事实实现不符合这个意图规范(以及 [RFC2821] 的规范,如果它们实际上导致信息丢失).同样,即使设置了这个限制消息,它依赖于显示消息的实现处理一行中任意数量的字符(当然至少最多 998 个字符的限制)为了鲁棒性.

The more conservative 78 character recommendation is to accommodate the many implementations of user interfaces that display these messages which may truncate, or disastrously wrap, the display of more than 78 characters per line, in spite of the fact that such implementations are non-conformant to the intent of this specification (and that of [RFC2821] if they actually cause information to be lost). Again, even though this limitation is put on messages, it is encumbant upon implementations which display messages to handle an arbitrarily large number of characters in a line (certainly at least up to the 998 character limit) for the sake of robustness.

这篇关于76 个字符是电子邮件 MIME 部分的长度限制 (RFC 2045) 的原因是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆