为什么mailto在计划之后没有// [英] Why doesn't mailto has // after the scheme
问题描述
在编写库代码以生成URI字符串时,我对mailto感到困惑.根据 RFC 3986 的URI授权必须在//
之前.权限是URI的一部分,其中userinfo和host驻留在userinfo @ host语法中.根据此RFC,格式应为:mailto://me@host.com
.但是,它不仅用作mailto:me@host.com
,而且还在 RFC 2368 和 RFC 6068 .
While writing a library code to generate URI strings, I got confused about mailto. According to RFC 3986 authority for a URI must be preceded by //
. Authority is the part of URI where the userinfo and host resides in userinfo@host syntax. According to this RFC the format should be: mailto://me@host.com
. However, it is used as mailto:me@host.com
not just in the wild but also shown like that in RFC 2368 and RFC 6068.
mailto作为URI的唯一方法是将电子邮件附加为路径,这没有多大意义.这个假设是正确的还是我遗漏了另一点?
The only way mailto being a URI is that the email is appended as path, which doesn't make much sense. Is this assumption correct or is there another point I am missing.
推荐答案
尽管mailto有点奇怪,但它似乎是一个URN.因此,在mailto:me@host.com
中,me@host.com
实际上是URI的路径,如 RFC 3986 所述a>
It seems that mailto is a URN, even if it feels a bit strange. Thus in mailto:me@host.com
, me@host.com
is indeed path for URI as described in RFC 3986
这篇关于为什么mailto在计划之后没有//的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!