fix(接口测试): 旧版 POST 请求query参数及URL中无法使用变量
This commit is contained in:
parent
49cc34b040
commit
57bb0a7a5e
|
@ -156,12 +156,15 @@ public class JmeterDocumentParser {
|
||||||
if (!StringUtils.equals("?", u)) {
|
if (!StringUtils.equals("?", u)) {
|
||||||
u += "&";
|
u += "&";
|
||||||
}
|
}
|
||||||
v = ScriptEngineUtils.calculate(v);
|
// 排除 jmeter 内置的函数
|
||||||
// urlencoder
|
if (!v.startsWith("$")) {
|
||||||
try {
|
v = ScriptEngineUtils.calculate(v);
|
||||||
v = URLEncoder.encode(v, "UTF-8");
|
// urlencoder
|
||||||
} catch (UnsupportedEncodingException e) {
|
try {
|
||||||
LogUtil.error(e);
|
v = URLEncoder.encode(v, "UTF-8");
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
LogUtil.error(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
u += k + "=" + v;
|
u += k + "=" + v;
|
||||||
return u;
|
return u;
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit e4b1f5838f00791b42b394ad00a365a14f28be83
|
Subproject commit e7709b9a340394e78610b91105b2cec0f1b8289d
|
Loading…
Reference in New Issue