简体   繁体   English

如何在JMeter中停用http参数的编码?

[英]How to deactivate encoding of the http parameters in JMeter?

I recorded some HTTP requests with opening a starting page, login etc. I also get the viewstate value from the previous request and use it in the next one. 我记录了一些HTTP请求,其中包括打开起始页,登录等。我还从上一个请求中获取viewstate值,并在下一个请求中使用它。 To ensure that the http parameters don't get encoded I removed all encoding checkboxes. 为了确保http参数不会被编码,我删除了所有编码复选框。

But when I start the run the parameters still get encoded (see second screenshot). 但是当我开始运行时,参数仍然得到编码(请参见第二张屏幕截图)。 Why is this happening? 为什么会这样呢? I tried it in JMeter 2.11 and 2.13. 我在JMeter 2.11和2.13中尝试过。

在此处输入图片说明

在此处输入图片说明

在此处输入图片说明

I had similar issue, and I came to conclusion that Encode? 我遇到了类似的问题,并且得出结论认为编码? only avoids encoding of parameter values, not parameter names (which is your case as well it seems). 仅避免对参数值进行编码,而不是对参数名称进行编码(看起来也是如此)。 I did not find any good solution that worked with Parameters tab. 我找不到与“ 参数”选项卡一起使用的任何好的解决方案。 Had to switch to Body Data and just format my own request. 必须切换到“ 身体数据”,然后格式化我自己的请求。 Basically you just change each param-value pair into param=value and add & to separate parameters: 基本上,您只需将每个参数值对更改为param=value并在单独的参数上添加&

form-login=form-login&form-login:xi-username:xi-username:login=${username}&...

What solved the problem was that I recorded it another two times and the second request worked finally. 解决问题的是,我又记录了两次,第二个请求终于生效了。 I can't explain why but I think this is always a good way to solve prblems with requests. 我无法解释为什么,但是我认为这始终是解决请求问题的好方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM