问题描述
通过阅读RFC可以看出,CID只能/必须包含与常规URI允许的字符相同的字符集.这样对吗.我问是因为我想编写一个简单的帮助程序,该帮助程序带有CID前缀,并在为mime多类型附件生成CID时添加一个计数器.
From reading the RFC it appears that CID can/must only contain characters from the same set as those permissable by a regular URI. Is this correct. Im asking because I wish to writeup a simple helper that takes a CIDs prefix and adds a counter when generating CID for mime multitypes attachments.
推荐答案
Content-ID值必须采用RFC-822 addr-spec(user @ domain)的形式.
The Content-ID value is required to be in the form of an RFC-822 addr-spec (user@domain).
由于addr-spec可能包含URL中不允许的字符,因此在"cid" URL中使用时,这些字符将进行十六进制编码.
Since an addr-spec may contain characters not allowed in a URL, those characters are hex-encoded when used in the "cid" URL.
根据RFC2392:
了解更多: http://www.faqs.org/rfcs/rfc2392.html
这篇关于Mime Multipart消息ContentId"CID:"的有效字符是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!