fix(接口测试): 修复环境域名是变量,变量值带https://,执行结果中请求地址错误的缺陷
--bug=1025602 --user=王孝刚 【项目设置】环境域名是变量,变量值带https://,执行结果中请求地址错误 https://www.tapd.cn/55049933/s/1364226
This commit is contained in:
parent
7d3122f4cb
commit
53c8ee81f9
|
@ -429,13 +429,12 @@ public class MsHTTPSamplerProxy extends MsTestElement {
|
|||
if (StringUtils.isNotBlank(this.getPath())) {
|
||||
envPath += this.getPath();
|
||||
}
|
||||
sampler.setPort(httpConfig.getPort());
|
||||
if (httpConfig.getDomain().startsWith("${")) {
|
||||
sampler.setProtocol(httpConfig.getProtocol());
|
||||
envPath = StringUtils.isNotBlank(this.path) ? StringUtils.join(httpConfig.getSocket(), this.path) : url;
|
||||
envPath = StringUtils.isNotBlank(this.path) ? StringUtils.join(url, this.path) : url;
|
||||
} else if (StringUtils.isNotEmpty(httpConfig.getDomain())) {
|
||||
sampler.setDomain(URLDecoder.decode(httpConfig.getDomain(), StandardCharsets.UTF_8.name()));
|
||||
sampler.setProtocol(httpConfig.getProtocol());
|
||||
sampler.setPort(httpConfig.getPort());
|
||||
} else {
|
||||
sampler.setDomain("");
|
||||
sampler.setProtocol("");
|
||||
|
|
Loading…
Reference in New Issue