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 a06b3738f8..a6e5a2c4e4 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 @@ -264,6 +264,10 @@ public class MsHTTPSamplerProxy extends MsTestElement { path = "/" + path; } String port = sampler.getPort() != 80 ? ":" + sampler.getPort() : ""; + if (StringUtils.equals("https", sampler.getProtocol()) && sampler.getPort() == 443) { + // 解决https delete请求时,path路径带443端口,请求头的host会变成域名加443 + port = ""; + } path = sampler.getProtocol() + "://" + sampler.getDomain() + port + path; } sampler.setProperty("HTTPSampler.path", path);