From 74f3fb00ea13399d4f3b6b41d32158e673a2b735 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Thu, 2 Dec 2021 15:31:36 +0800 Subject: [PATCH] =?UTF-8?q?fix=20(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E4=BF=AE=E5=A4=8D=E8=87=AA=E5=AE=9A=E4=B9=89=E5=8F=98?= =?UTF-8?q?=E9=87=8F=E4=B8=BA=E5=85=A8=E8=B7=AF=E5=BE=84=EF=BC=8C=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E4=B8=AD=E4=B8=8D=E9=85=8D=E7=BD=AEurl=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=89=A7=E8=A1=8C=E5=A4=9A=E5=87=BAhttp:/?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1008494 --user=赵勇 [github#8244] url不能完全使用环境变量或参数形式 https://www.tapd.cn/55049933/s/1077354 --- .../apache/jmeter/protocol/http/sampler/HTTPSamplerProxy.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/src/main/java/org/apache/jmeter/protocol/http/sampler/HTTPSamplerProxy.java b/backend/src/main/java/org/apache/jmeter/protocol/http/sampler/HTTPSamplerProxy.java index dcf2d626ab..216387be83 100644 --- a/backend/src/main/java/org/apache/jmeter/protocol/http/sampler/HTTPSamplerProxy.java +++ b/backend/src/main/java/org/apache/jmeter/protocol/http/sampler/HTTPSamplerProxy.java @@ -112,6 +112,9 @@ public final class HTTPSamplerProxy extends HTTPSamplerBase implements Interrupt } try { String url = toExternalForm(u); + if (StringUtils.isNotEmpty(url) && url.startsWith("http:/http")) { + url = url.substring(6); + } u = new URL(url); } catch (Exception ex) { LogUtil.error(ex);