From 019fa6709a2c467b3d10459d975f8d528126249a Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Mon, 8 Mar 2021 13:30:12 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96):=20=E4=BF=AE=E5=A4=8Dheaders=E5=92=8C=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E5=90=8C=E5=90=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/definition/request/configurations/MsHeaderManager.java | 2 +- .../api/dto/definition/request/sampler/MsHTTPSamplerProxy.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/request/configurations/MsHeaderManager.java b/backend/src/main/java/io/metersphere/api/dto/definition/request/configurations/MsHeaderManager.java index f0f0e19e95..d1d9bb5098 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/request/configurations/MsHeaderManager.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/request/configurations/MsHeaderManager.java @@ -30,7 +30,7 @@ public class MsHeaderManager extends MsTestElement { public void toHashTree(HashTree tree, List hashTree, ParameterConfig config) { HeaderManager headerManager = new HeaderManager(); headerManager.setEnabled(this.isEnable()); - headerManager.setName(StringUtils.isNotEmpty(this.getName()) ? this.getName() : "HeaderManager"); + headerManager.setName(StringUtils.isNotEmpty(this.getName()) ? this.getName() + "HeaderManager" : "HeaderManager"); headerManager.setProperty(TestElement.TEST_CLASS, HeaderManager.class.getName()); headerManager.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("HeaderPanel")); headers.stream().filter(KeyValue::isValid).filter(KeyValue::isEnable).forEach(keyValue -> 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 128685a0e8..dfaa8841bf 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 @@ -306,7 +306,7 @@ public class MsHTTPSamplerProxy extends MsTestElement { public void setHeader(HashTree tree, List headers) { HeaderManager headerManager = new HeaderManager(); headerManager.setEnabled(true); - headerManager.setName(StringUtils.isNotEmpty(this.getName()) ? this.getName() : "HeaderManager"); + headerManager.setName(StringUtils.isNotEmpty(this.getName()) ? this.getName() + "HeaderManager" : "HeaderManager"); headerManager.setProperty(TestElement.TEST_CLASS, HeaderManager.class.getName()); headerManager.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("HeaderPanel")); headers.stream().filter(KeyValue::isValid).filter(KeyValue::isEnable).forEach(keyValue ->