From adb7dc272861ea14f34e952251b0048c261cc063 Mon Sep 17 00:00:00 2001 From: q4speed Date: Tue, 26 May 2020 12:59:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B9=B1=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/api/jmeter/APIBackendListenerClient.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java b/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java index 2b88720d76..708b718643 100644 --- a/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java +++ b/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java @@ -12,6 +12,7 @@ import org.apache.jmeter.visualizers.backend.AbstractBackendListenerClient; import org.apache.jmeter.visualizers.backend.BackendListenerContext; import java.io.Serializable; +import java.nio.charset.StandardCharsets; import java.util.*; /** @@ -122,7 +123,7 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl requestResult.setError(result.getErrorCount()); ResponseResult responseResult = requestResult.getResponseResult(); - responseResult.setBody(result.getResponseDataAsString()); + responseResult.setBody(new String(result.getResponseData(), StandardCharsets.UTF_8)); responseResult.setHeaders(result.getResponseHeaders()); responseResult.setLatency(result.getLatency()); responseResult.setResponseCode(result.getResponseCode());