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 98be2e11e7..5e28698ccb 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 @@ -294,7 +294,7 @@ public class MsHTTPSamplerProxy extends MsTestElement { sampler.setPath(url); } if (StringUtils.isNotEmpty(this.getPort()) && this.getPort().startsWith("${")) { - url.replaceAll(this.getPort(), "10990"); + url = url.replaceAll(this.getPort(), "10990"); } try { URL urlObject = new URL(url);