From f4decf1390fa481bb1a8195510d64fd6f1216221 Mon Sep 17 00:00:00 2001 From: dennisvdm Date: Tue, 20 Feb 2018 12:10:46 +0100 Subject: [PATCH] Update KatharsisFilter.java When the Scanner object is created, it should not use the system's charset, but use a specified charset, UTF-8. See KatharsisInvoker.java, where it's already done like that. --- katharsis-rs/src/main/java/io/katharsis/rs/KatharsisFilter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/katharsis-rs/src/main/java/io/katharsis/rs/KatharsisFilter.java b/katharsis-rs/src/main/java/io/katharsis/rs/KatharsisFilter.java index b978be09..8d10bede 100644 --- a/katharsis-rs/src/main/java/io/katharsis/rs/KatharsisFilter.java +++ b/katharsis-rs/src/main/java/io/katharsis/rs/KatharsisFilter.java @@ -213,7 +213,7 @@ public Document inputStreamToBody(InputStream is) throws IOException { if (is == null) { return null; } - Scanner s = new Scanner(is).useDelimiter("\\A"); + Scanner s = new Scanner(is, "UTF-8").useDelimiter("\\A"); String requestBody = s.hasNext() ? s.next() : ""; if (requestBody == null || requestBody.isEmpty()) { return null;