url 的查询部分可以有 @ 符号吗?
我正在使用的服务器将电子邮件地址作为用户可以单击的 URL 中的查询的一部分。现在,@
符号在 URL 中被编码为 @
符号,这完全可以正常工作。我认为这会破坏事情,并且我需要将其更改为 %40
,但情况似乎并非如此(根据我的经验)。由于我无法访问无数不同的配置和浏览器,因此我想我应该在这里检查一下这是否会在其他地方出现问题。
有比我更有见识的人愿意插话吗?
萨米人
A server I'm working on has email addresses as part of a query in a URL that users can click on. Right now, the @
sign is encoded as an @
sign in the urls, and this works totally fine. I thought it would break things and that I would need to change this to a %40
, but that doesn't seem to be the case (from my experience). Since I don't have access to countless different configurations and browsers, I figured I would check here to see whether or not this will be a problem elsewhere.
Anybody more knowledgeable than me wanna chime in?
Sami
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你能不编码就通过吗?大概。我相信 @(at 符号)仅在构建 FTP URL 时使用(例如 ftp://user:password@host:port)。我仍然会对它进行编码,因为根据 RFC 3986<,@ 符号是保留字符/a>.
Could you get by without encoding it? Probably. I believe the @ (at sign) is only used when building out an FTP URL (e.g. ftp://user:password@host:port). I would still encode it because the @ sign is a reserved character according to RFC 3986.