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

This commit is contained in:
wxg0103 2022-08-22 16:14:39 +08:00 committed by f2c-ci-robot[bot]
parent 2133ab291b
commit 2bb1a173b5
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"); url = url.replace(this.getPort(), "10990");
} }
try { try {
if (StringUtils.startsWithAny(url, "http://", "https://")) {
url = "http://" + url;
}
URL urlObject = new URL(url); URL urlObject = new URL(url);
sampler.setDomain(URLDecoder.decode(urlObject.getHost(), "UTF-8")); sampler.setDomain(URLDecoder.decode(urlObject.getHost(), "UTF-8"));

View File

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