问题
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