Revision: 8009 http://languagetool.svn.sourceforge.net/languagetool/?rev=8009&view=rev Author: dnaber Date: 2012-09-09 12:49:57 +0000 (Sun, 09 Sep 2012) Log Message: ----------- HTTP API: send error messages in UTF-8, too
Modified Paths: -------------- trunk/JLanguageTool/src/main/java/org/languagetool/server/LanguageToolHttpHandler.java Modified: trunk/JLanguageTool/src/main/java/org/languagetool/server/LanguageToolHttpHandler.java =================================================================== --- trunk/JLanguageTool/src/main/java/org/languagetool/server/LanguageToolHttpHandler.java 2012-09-09 10:26:59 UTC (rev 8008) +++ trunk/JLanguageTool/src/main/java/org/languagetool/server/LanguageToolHttpHandler.java 2012-09-09 12:49:57 UTC (rev 8009) @@ -89,8 +89,8 @@ } private void sendError(HttpExchange httpExchange, int returnCode, String response) throws IOException { - httpExchange.sendResponseHeaders(returnCode, response.getBytes().length); - httpExchange.getResponseBody().write(response.getBytes()); + httpExchange.sendResponseHeaders(returnCode, response.getBytes(ENCODING).length); + httpExchange.getResponseBody().write(response.getBytes(ENCODING)); } private Map<String, String> getRequestQuery(HttpExchange httpExchange, URI requestedUri) throws IOException { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Languagetool-cvs mailing list Languagetool-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/languagetool-cvs