From 961f785060f749ed97b0516745cb9ad2fd2704cc 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 --- .../gv/egovernment/moa/id/auth/servlet/MonitoringServlet.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'id/server/modules/module-monitoring/src/main/java/at') diff --git a/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringServlet.java b/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringServlet.java index 70448ef09..9adf2edc3 100644 --- a/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringServlet.java +++ b/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringServlet.java @@ -118,13 +118,12 @@ public class MonitoringServlet { 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