【问题标题】:What are the parsed components of a mailto URImailto URI 的解析组件是什么
【发布时间】:2019-06-21 16:45:48
【问题描述】:

电子邮件地址是有效的 URI when encoded using the mailto scheme

 mailto:user@example.com

(见RFC 6068

但是应该如何根据RFC 3986统一资源标识符(URI)的标准:通用语法进行解析?

  • 电子邮件地址的用户名部分(mailto:user@example.comuser)是user info 部分的用户名吗?

  • 电子邮件地址的主机名部分(example.commailto:user@example.com)是host part吗?

【问题讨论】:

标签: email uri language-lawyer mailto


【解决方案1】:

尽管电子邮件地址包含用户名和主机名,但当在 mailto URI 中编码时,电子邮件地址构成 URI 的 路径 的一部分,而用户部分和主机部分被认为是空的。这是因为用户、密码(如果存在)和主机将构成 URI 的 authority 部分,前面必须有“//

也就是说,如果 'mailto' URI 方案强制要求 mailto://user@example.com 而不是 mailto:user@example.com,则解析将按预期进行。因此,“mailto”是rather strangely, a URN

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-07-07
    • 2015-05-19
    • 2010-12-19
    • 1970-01-01
    • 2010-10-21
    • 1970-01-01
    相关资源
    最近更新 更多