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/server/modules/moa-id-modules-saml1/src | |
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/server/modules/moa-id-modules-saml1/src')
-rw-r--r-- | id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/GetAuthenticationDataService.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/GetAuthenticationDataService.java b/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/GetAuthenticationDataService.java index 893799b5d..13df30862 100644 --- a/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/GetAuthenticationDataService.java +++ b/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/GetAuthenticationDataService.java @@ -344,8 +344,11 @@ public class GetAuthenticationDataService extends AbstractController implements VelocityEngine engine = VelocityProvider.getClassPathVelocityEngine(); BufferedReader reader = new BufferedReader(new InputStreamReader(is )); StringWriter writer = new StringWriter(); - engine.evaluate(context, writer, "SAML1 GetAuthenticationData", reader); - httpResp.getOutputStream().write(writer.toString().getBytes("UTF-8")); + engine.evaluate(context, writer, "SAML1 GetAuthenticationData", reader); + + byte[] content = writer.toString().getBytes("UTF-8"); + httpResp.setContentLength(content.length); + httpResp.getOutputStream().write(content); } catch (Exception e) { Logger.error("SAML1 GetAuthenticationData has an error:", e); |