aboutsummaryrefslogtreecommitdiff
path: root/id/server/modules/module-monitoring/src/main
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-09-30 09:22:29 +0200
commitd025c38a426e22b0d1ccfbb4558ff6ce78ac1d0b (patch)
tree6bd538b3faab08ecec07c1fcff47e4c84f483b47 /id/server/modules/module-monitoring/src/main
parent5dda0359afcdc69b11bc9a8df5c527e6c1488b6f (diff)
downloadmoa-id-spss-d025c38a426e22b0d1ccfbb4558ff6ce78ac1d0b.tar.gz
moa-id-spss-d025c38a426e22b0d1ccfbb4558ff6ce78ac1d0b.tar.bz2
moa-id-spss-d025c38a426e22b0d1ccfbb4558ff6ce78ac1d0b.zip
refactor http servlet response processing to prohibit 'chunked' transfer encoding
Diffstat (limited to 'id/server/modules/module-monitoring/src/main')
-rw-r--r--id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringController.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/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 + "<br>");
- out.flush();
-
+ resp.getWriter().write(error + "<br>");
+
} catch (IOException e) {
Logger.warn("Internal Monitoring Servlet Error. ", e);
}