aboutsummaryrefslogtreecommitdiff
path: root/id/server/modules/module-monitoring
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2016-09-30 09:22:29 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2016-10-07 07:44:58 +0200
commit961f785060f749ed97b0516745cb9ad2fd2704cc (patch)
tree23c10876368166f1e65a6719d31ae81784d54b8f /id/server/modules/module-monitoring
parent58c843aa630c1e6fd2680cf019f7e270abbe9a69 (diff)
downloadmoa-id-spss-961f785060f749ed97b0516745cb9ad2fd2704cc.tar.gz
moa-id-spss-961f785060f749ed97b0516745cb9ad2fd2704cc.tar.bz2
moa-id-spss-961f785060f749ed97b0516745cb9ad2fd2704cc.zip
refactor http servlet response processing to prohibit 'chunked' transfer encoding
Diffstat (limited to 'id/server/modules/module-monitoring')
-rw-r--r--id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringServlet.java11
1 files changed, 5 insertions, 6 deletions
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 + "<br>");
- out.flush();
-
+ resp.getWriter().write(error + "<br>");
+
} catch (IOException e) {
Logger.warn("Internal Monitoring Servlet Error. ", e);
}