负载测试工具URL编码系统
我有一个负载测试工具(Borland 的 SilkPerformer),它将 /
字符编码为 \x252f
。谁能告诉我该工具可能使用什么编码系统?
I have a load testing tool (Borland's SilkPerformer) that is encoding /
character as \x252f
. Can anyone please tell me what encoding system the tool might be using?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
两个不同的转义序列已组合:
请参阅这个小图:
一步步解释:
\
启动 C 字符串转义序列。x
是十六进制表示法中的转义符。预计后面会出现两个十六进制数字。25
是 ASCII 中的%
,请参见ASCII 表。%
启动 URL 编码,也称为 百分比编码。预计后面会出现两个十六进制数字。2f
是 ASCII 中的斜杠字符 (/
)。现在我不知道为什么你的软件选择以如此奇怪的方式对斜杠字符进行编码。如果 url 中的斜杠字符不表示目录分隔符,则需要对其进行 url 编码(与 Windows 中的反斜杠的作用相同)。因此,您经常会发现斜杠字符被编码为
%2f
。这很正常。但我觉得很奇怪,而且有点可疑,百分号字符还被编码为 C 字符串的十六进制转义序列。Two different escape sequences have been combined:
See this little diagram:
Explained step for step:
\
starts a C string escape sequence.x
is an escape in hexadecimal notation. Two hex digits are expected to follow.25
is%
in ASCII, see ASCII Table.%
starts an URL encode, also called Percent-encoding. Two hex digits are expected to follow.2f
is the slash character (/
) in ASCII.Now I don't know why your software chooses to encode the slash character in such a weird way. Slash characters in urls need to be url encoded if they don't denote directory separators (the same thing the backslash does for Windows). So you will often find the slash character being encoded as
%2f
. That's normal. But I find it weird and a bit suspicious that the percent character is additionally encoded as a hexadecimal escape sequence for C strings.