Why doesn't mailto has // after the scheme [duplicate]

天涯浪子 提交于 2019-12-11 05:48:40

问题


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.

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.


回答1:


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



来源:https://stackoverflow.com/questions/37633898/why-doesnt-mailto-has-after-the-scheme

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!