fix(接口定义): 修复自定义请求不输入协议无法访问的缺陷 (#17214)

Co-authored-by: wxg0103 <727495428@qq.com>
This commit is contained in:
MeterSphere Bot 2022-08-22 16:59:08 +08:00 committed by GitHub
parent 458e982c98
commit 8ca3b2e57c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -397,6 +397,9 @@ public class MsHTTPSamplerProxy extends MsTestElement {
url = url.replace(this.getPort(), "10990");
}
try {
if (StringUtils.startsWithAny(url, "http://", "https://")) {
url = "http://" + url;
}
URL urlObject = new URL(url);
sampler.setDomain(URLDecoder.decode(urlObject.getHost(), "UTF-8"));

View File

@ -184,6 +184,7 @@ export default {
},
list() {
if (this.projectId) {
this.caseCondition.casePublic = false;
this.result = getTestCaseNodesByCaseFilter(this.projectId, this.caseCondition, data => {
this.treeNodes = data;
this.treeNodes.forEach(node => {