url - 有没有理由在 URL 中使用混合斜杠?
问题描述
https:\/\/
我刚开始工作的网站有大量以或开头的链接
http:\/\/
- 在我问这是否是某些查找/替换程序运行异常的结果之前,任何人都可以解释是否有充分的理由使用它?
可能是一个非常菜鸟的问题,提前非常感谢!
解决方案
According to the URL specification, the backslash is considered an unsafe character and needs to be encoded:
Octets must be encoded if they have no corresponding graphic character within the US-ASCII coded character set, if the use of the corresponding character is unsafe [...]
And:
Other characters are unsafe because gateways and other transport agents are known to sometimes modify such characters. These characters are "{", "}", "|", "\", "^", "~", "[", "]", and "`".
推荐阅读
- spring-boot - 如何在apache flink上运行spring boot jar?
- c++ - 单向排序的 C++ 节点
- python - python中的polyfit二次图
- python - Python - 如何获取结构中所有字段的列表?
- python - 如何让 python 返回一行代码?
- django - 不同的PostgreSQL数据库:本地和远程| 姜戈
- coroutine - (重新)调用协程和等待它有什么区别?
- docker - 托管在 Kubernetes 上的 Nexus Docker 存储库的入口
- laravel - 如何在需要 2 个具有相似关系的模型的情况下发出 Eloquent 请求?
- python-3.x - Python选择排序错误答案