--- miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/web/BanListener.java 2013/03/20 15:10:54 1938 +++ miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/web/BanListener.java 2015/03/09 11:56:37 2428 @@ -41,9 +41,6 @@ @Override public void handle(HttpExchange http) throws IOException { - /* if(!event.path[0].equalsIgnoreCase("webstatus")) { - return; - }*/ String text; @@ -59,10 +56,12 @@ } byte bytes[] = text.getBytes(); + http.getResponseHeaders().add("Content-Type", "text/plain"); http.sendResponseHeaders(HttpURLConnection.HTTP_OK, bytes.length ); final OutputStream os = http.getResponseBody(); os.write(bytes); os.close(); + http.close(); }