From b8d87f685b858c3fe2bbdc2a36dfc053dbf6e077 Mon Sep 17 00:00:00 2001 From: Nananapatt0 <90308292+Nananapatt0@users.noreply.github.com> Date: Wed, 15 Sep 2021 21:29:31 +0700 Subject: [PATCH 1/2] Update VariableSpeedClientServerTest.java --- .../org/littleshoot/proxy/VariableSpeedClientServerTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/org/littleshoot/proxy/VariableSpeedClientServerTest.java b/src/test/java/org/littleshoot/proxy/VariableSpeedClientServerTest.java index 26f330c1c..ca1e61122 100644 --- a/src/test/java/org/littleshoot/proxy/VariableSpeedClientServerTest.java +++ b/src/test/java/org/littleshoot/proxy/VariableSpeedClientServerTest.java @@ -151,7 +151,7 @@ private void startServerOnThread(int port, boolean slowReader) "Date: Sun, 20 Jan 2013 00:16:23 GMT\r\n" + "Expires: -1\r\n" + "Cache-Control: private, max-age=0\r\n" + - "Content-Type: text/html; charset=ISO-8859-1\r\n" + + "Content-Type: text/html; charset=utf-8\r\n" + "Server: gws\r\n" + "Content-Length: " + CONTENT_LENGTH + "\r\n\r\n"; // 10 // gigs From 2ae129ec1b175c766c13b1cccdfc84abd395c67c Mon Sep 17 00:00:00 2001 From: Nananapatt0 <90308292+Nananapatt0@users.noreply.github.com> Date: Wed, 15 Sep 2021 21:34:43 +0700 Subject: [PATCH 2/2] Update MessageTerminationTest.java --- .../java/org/littleshoot/proxy/MessageTerminationTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/java/org/littleshoot/proxy/MessageTerminationTest.java b/src/test/java/org/littleshoot/proxy/MessageTerminationTest.java index 7383897c3..f662f559a 100644 --- a/src/test/java/org/littleshoot/proxy/MessageTerminationTest.java +++ b/src/test/java/org/littleshoot/proxy/MessageTerminationTest.java @@ -77,7 +77,7 @@ public void testResponseWithoutTerminationIsChunked() throws Exception { String transferEncoding = transferEncodingHeaders[0].getValue(); assertEquals("Expected Transfer-Encoding to be chunked", "chunked", transferEncoding); - String bodyString = EntityUtils.toString(response.getEntity(), "ISO-8859-1"); + String bodyString = EntityUtils.toString(response.getEntity(), "UTF-8"); response.getEntity().getContent().close(); assertEquals("Success!", bodyString); @@ -112,7 +112,7 @@ public void testResponseWithContentLengthNotModified() throws Exception { Header[] transferEncodingHeaders = response.getHeaders("Transfer-Encoding"); assertThat("Did not expect to see a Transfer-Encoding header", transferEncodingHeaders, emptyArray()); - String bodyString = EntityUtils.toString(response.getEntity(), "ISO-8859-1"); + String bodyString = EntityUtils.toString(response.getEntity(), "UTF-8"); response.getEntity().getContent().close(); assertEquals("Success!", bodyString); @@ -159,7 +159,7 @@ public int getMaximumResponseBufferSizeInBytes() { Header[] contentLengthHeaders = response.getHeaders("Content-Length"); assertThat("Expected to see a Content-Length header", contentLengthHeaders.length, greaterThanOrEqualTo(1)); - String bodyString = EntityUtils.toString(response.getEntity(), "ISO-8859-1"); + String bodyString = EntityUtils.toString(response.getEntity(), "UTF-8"); response.getEntity().getContent().close(); assertEquals("Success!", bodyString);