From 62c720f0a9660eff8cee2c1b2af4a4e3939188db Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Mon, 29 Jun 2020 11:28:06 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95-?= =?UTF-8?q?=E4=B8=BB=E6=9C=BA=E5=92=8C=E7=AB=AF=E5=8F=A3=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/business/components/api/test/model/JMX.js | 8 ++++---- .../business/components/api/test/model/ScenarioModel.js | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/src/business/components/api/test/model/JMX.js b/frontend/src/business/components/api/test/model/JMX.js index 0df2cad08f..a3b2fb8e14 100644 --- a/frontend/src/business/components/api/test/model/JMX.js +++ b/frontend/src/business/components/api/test/model/JMX.js @@ -224,10 +224,10 @@ export class HTTPSamplerProxy extends DefaultTestElement { constructor(testName, request) { super('HTTPSamplerProxy', 'HttpTestSampleGui', 'HTTPSamplerProxy', testName); this.request = request || {}; - - this.stringProp("HTTPSampler.domain", this.request.hostname); - this.stringProp("HTTPSampler.protocol", this.request.protocol.split(":")[0]); - this.stringProp("HTTPSampler.path", this.request.pathname); + // this.stringProp("HTTPSampler.domain", this.request.hostname); + // this.stringProp("HTTPSampler.protocol", this.request.protocol.split(":")[0]); + //主机名和端口添加在 path 中,支持变量的形式 + this.stringProp("HTTPSampler.path", this.request.url); this.stringProp("HTTPSampler.method", this.request.method); this.stringProp("HTTPSampler.contentEncoding", this.request.encoding, "UTF-8"); if (!this.request.port) { diff --git a/frontend/src/business/components/api/test/model/ScenarioModel.js b/frontend/src/business/components/api/test/model/ScenarioModel.js index c50913b513..d719a438b7 100644 --- a/frontend/src/business/components/api/test/model/ScenarioModel.js +++ b/frontend/src/business/components/api/test/model/ScenarioModel.js @@ -393,6 +393,7 @@ class JMXRequest { this.pathname = decodeURIComponent(url.pathname); this.port = url.port; this.protocol = url.protocol.split(":")[0]; + this.url = request.url; if (this.method.toUpperCase() !== "GET") { this.pathname += url.search.replace('&', '&'); }