From d025c38a426e22b0d1ccfbb4558ff6ce78ac1d0b Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Fri, 30 Sep 2016 09:22:29 +0200 Subject: refactor http servlet response processing to prohibit 'chunked' transfer encoding --- .../egovernment/moa/id/auth/servlet/MonitoringController.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'id/server/modules/module-monitoring') diff --git a/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringController.java b/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringController.java index 8d324b535..b232b9512 100644 --- a/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringController.java +++ b/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringController.java @@ -112,13 +112,12 @@ public class MonitoringController { Logger.warn("Monitoring Servlet found some Error: " + errorMessage); resp.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); resp.setContentType("text/html;charset=UTF-8"); - PrintWriter out; - try { - out = new PrintWriter(resp.getOutputStream()); + resp.setCharacterEncoding("UTF-8"); + + try { for (String error : errorMessage) - out.write(error + "
"); - out.flush(); - + resp.getWriter().write(error + "
"); + } catch (IOException e) { Logger.warn("Internal Monitoring Servlet Error. ", e); } -- cgit v1.2.3