diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java b/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java index d70423500e..da58252890 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java @@ -163,7 +163,11 @@ public class MsHTTPSamplerProxy extends MsTestElement { sampler.setProtocol(urlObject.getProtocol()); sampler.setPath(urlObject.getPath()); } else { - sampler.setDomain(config.getConfig().get(this.getProjectId()).getHttpConfig().getDomain()); + String configStr = config.getConfig().get(this.getProjectId()).getHttpConfig().getSocket(); + sampler.setDomain(configStr); + if (config.getConfig().get(this.getProjectId()).getHttpConfig().getPort() > 0) { + sampler.setDomain(config.getConfig().get(this.getProjectId()).getHttpConfig().getDomain()); + } sampler.setPort(config.getConfig().get(this.getProjectId()).getHttpConfig().getPort()); sampler.setProtocol(config.getConfig().get(this.getProjectId()).getHttpConfig().getProtocol()); sampler.setPath(this.getPath()); diff --git a/frontend/src/business/components/api/definition/components/runtest/RunTestHTTPPage.vue b/frontend/src/business/components/api/definition/components/runtest/RunTestHTTPPage.vue index 68a0eb1806..09b0e4d48d 100644 --- a/frontend/src/business/components/api/definition/components/runtest/RunTestHTTPPage.vue +++ b/frontend/src/business/components/api/definition/components/runtest/RunTestHTTPPage.vue @@ -71,27 +71,27 @@