From 437be79d690b488d01db87c24ca6669563071bb7 Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Wed, 17 Aug 2016 15:35:14 +0200 Subject: [PATCH] Fixed JSONERROR handling --- src/io/github/norbipeti/chat/server/io/IOHelper.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/io/github/norbipeti/chat/server/io/IOHelper.java b/src/io/github/norbipeti/chat/server/io/IOHelper.java index 2537993..3f5726c 100644 --- a/src/io/github/norbipeti/chat/server/io/IOHelper.java +++ b/src/io/github/norbipeti/chat/server/io/IOHelper.java @@ -101,6 +101,8 @@ public class IOHelper { public static JsonObject GetPOSTJSON(HttpExchange exchange) { try { String content = GetPOST(exchange); + if (content.length() == 0) + return null; JsonElement e = new JsonParser().parse(content); if (e == null) return null;