diff options
author | Thomas Lenz <tlenz@iaik.tugraz.at> | 2016-09-30 09:22:29 +0200 |
---|---|---|
committer | Thomas Lenz <tlenz@iaik.tugraz.at> | 2016-10-07 07:44:58 +0200 |
commit | 961f785060f749ed97b0516745cb9ad2fd2704cc (patch) | |
tree | 23c10876368166f1e65a6719d31ae81784d54b8f /id/ConfigWebTool | |
parent | 58c843aa630c1e6fd2680cf019f7e270abbe9a69 (diff) | |
download | moa-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/ConfigWebTool')
-rw-r--r-- | id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/auth/pvp2/servlets/BuildMetadata.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/auth/pvp2/servlets/BuildMetadata.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/auth/pvp2/servlets/BuildMetadata.java index 5b413567a..7256d8688 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/auth/pvp2/servlets/BuildMetadata.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/auth/pvp2/servlets/BuildMetadata.java @@ -285,12 +285,12 @@ public class BuildMetadata extends HttpServlet { transformer.transform(source, sr); sw.close(); - String metadataXML = sw.toString(); + byte[] metadataXML = sw.toString().getBytes("UTF-8"); response.setContentType("text/xml"); - response.getOutputStream().write(metadataXML.getBytes()); + response.setContentLength(metadataXML.length); + response.getOutputStream().write(metadataXML); - response.getOutputStream().close(); } catch (ConfigurationException e) { log.warn("Configuration can not be loaded.", e); |