可以“双点"成为URL路径部分的一部分 [英] Can "double-dots" be part of the path part of an URL
本文介绍了可以“双点"成为URL路径部分的一部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
像下面的示例一样,在URL中使用父目录双点字是否安全有效?
Is it valid and safe to use the parent directory double-dots inside an URL like in the following example:
http://example.com/path/../to/file.jpg
推荐答案
RFC3986 定义URI.
它描述了路径是如何分层的以及如何...
It describes how paths are hierarchical, and how...
路径段为."和"..",也称为点段
The path segments "." and "..", also known as dot-segments
...以类似于文件系统路径的方式工作.
... work in a similar way to filesystem paths.
它还描述了相对分辨率"的规则,其中可能删除了.
和 ..
.
It also describes rules for "relative resolution" in which .
and ..
may be removed.
从本质上讲,这是合法的,并且可以满足您的期望.
Essentially, it is legal and does what you expect.
这篇关于可以“双点"成为URL路径部分的一部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文