aboutsummaryrefslogtreecommitdiff
path: root/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv
diff options
context:
space:
mode:
Diffstat (limited to 'id/server/modules/moa-id-modules-saml1/src/main/java/at/gv')
-rw-r--r--id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/GetAuthenticationDataService.java7
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);