网址和加号 [英] URLs and plus signs
本文介绍了网址和加号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道URL的查询字符串中的 +
表示一个空格。这也是查询字符串区域以外的情况吗?也就是说,请执行以下URL:
I am aware that a +
in the query string of a URL represents a space. Is this also the case outside of the query string region? That is to say, does the following URL:
http://a.com/a+b/c
实际上代表:
http://a.com/a b/c
(因此需要编码如果它实际上应该是一个 +
),或者其实际上实际上代表了 a + b / c
?
(and thus need to be encoded if it should actually be a +
), or does it in fact actually represent a+b/c
?
推荐答案
- URL的路径部分的编码百分比预计将被解码,但
- 路径组件中的任何
+
字符预计将被字面处理。 - Percent encoding in the path section of a URL is expected to be decoded, but
- any
+
characters in the path component is expected to be treated literally.
要显式: +
只是查询组件中的一个特殊字符。
To be explicit: +
is only a special character in the query component.
这篇关于网址和加号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文