diff --git a/api-test/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java b/api-test/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java index 867d489110..d2d11bf055 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java +++ b/api-test/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java @@ -473,8 +473,9 @@ public class MsHTTPSamplerProxy extends MsTestElement { sampler.setPort(urlObject.getPort()); } sampler.setProtocol(urlObject.getProtocol()); - sampler.setProperty("HTTPSampler.path", URLDecoder.decode(url, StandardCharsets.UTF_8.name()), StandardCharsets.UTF_8.name()); + sampler.setProperty("HTTPSampler.path", URLDecoder.decode(urlObject.getPath(), StandardCharsets.UTF_8.name()), StandardCharsets.UTF_8.name()); } catch (Exception e) { + sampler.setProperty("HTTPSampler.path", url); LogUtil.error(e.getMessage(), e); } }