fix(接口测试): 修复QUERY参数拼接到URL中出现换行问题
--bug=1012001 --user=赵勇 [接口定义]github#12376接口定义,使用批量添加的参数,执行时url拼接的参数都会添加上换行符 https://www.tapd.cn/55049933/s/1131779
This commit is contained in:
parent
60cf1f8b33
commit
afd942c2ac
|
@ -654,6 +654,10 @@ public class MsHTTPSamplerProxy extends MsTestElement {
|
|||
try {
|
||||
String value = keyValue.getValue().startsWith("@") ? ScriptEngineUtils.buildFunctionCallString(keyValue.getValue()) : keyValue.getValue();
|
||||
value = keyValue.isUrlEncode() ? "${__urlencode(" + value + ")}" : value;
|
||||
|
||||
if (StringUtils.isNotEmpty(value) && value.contains("\r")) {
|
||||
value = value.replaceAll("\r", "");
|
||||
}
|
||||
stringBuffer.append("=").append(value);
|
||||
} catch (Exception e) {
|
||||
LogUtil.error(e);
|
||||
|
|
Loading…
Reference in New Issue