JMeter-/在后续的HTTP请求中发布时被/%2F替换 [英] JMeter - / replaced with %2F when posting in subsequent HTTP request
本文介绍了JMeter-/在后续的HTTP请求中发布时被/%2F替换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
应用程序:ASP.NET
Application: ASP.NET
在Regex后处理器中捕获的值:
Value captured in Regex post processor:
__VIEWSTATE: /wEPDwULLTEwMjgyMTI3ODAPZBYCAgEPZBYCAgEPDxYCHgRUZXh0ZWRkZAX+cy5B/46umWN01upyRg2q//kD
在HTTP请求中发布的值:
Value posted in HTTP request:
__VIEWSTATE: %2FwEPDwULLTEwMjgyMTI3ODAPZBYCAgEPZBYCAgEPDxYCHgRUZXh0ZWRkZAX+cy5B%2F46umWN01upyRg2q%2F%2FkD
问题:发布时,/
被替换为%2F
.
Problem: /
is replaced with %2F
when posting.
响应:该页面的状态信息无效,并且可能已损坏.
Response: The state information is invalid for this page and might be corrupted.
感谢您为解决此问题提供的帮助...
Appreciate any help in sorting out this issue...
推荐答案
有几种选择可以继续:
- 取消选中编码?" HTTP请求采样器的__VIEWSTATE参数的框-将按原样发送.
- 使用 __urldecode() JMeter函数
-
将 Beanshell预处理器与以下内容配合使用代码:
- Uncheck "Encode?" box for __VIEWSTATE parameter of HTTP Request Sampler - it will be sent as is.
- Use __urldecode() JMeter Function
Use Beanshell Pre Processor with the following code:
import java.net.URLDecoder;
vars.put("VIEWSTATE", URLDecoder.decode(vars.get("VIEWSTATE"), "UTF-8"));
上面的代码假定保存您的viewstate的变量称为VIEWSTATE
The code above assumes that variable holding your viewstate is called VIEWSTATE
这篇关于JMeter-/在后续的HTTP请求中发布时被/%2F替换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文