From 538378602603a859803fc13288e22ca71107687f Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Tue, 11 May 2021 10:35:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:DELETE,HTTPS=E8=AF=B7=E6=B1=82=E5=A4=B4?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=B7=BB=E5=8A=A0=E7=9A=84HOST=E5=B8=A6?= =?UTF-8?q?=E4=BA=86443=E7=AB=AF=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/definition/request/sampler/MsHTTPSamplerProxy.java | 4 ++++ 1 file changed, 4 insertions(+) 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);