From 961f785060f749ed97b0516745cb9ad2fd2704cc Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Fri, 30 Sep 2016 09:22:29 +0200 Subject: refactor http servlet response processing to prohibit 'chunked' transfer encoding --- .../elgamandates/controller/ELGAMandateMetadataController.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'id/server/modules/moa-id-module-elga_mandate_service') diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/controller/ELGAMandateMetadataController.java b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/controller/ELGAMandateMetadataController.java index 5720e4827..ca7401ab7 100644 --- a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/controller/ELGAMandateMetadataController.java +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/controller/ELGAMandateMetadataController.java @@ -82,9 +82,11 @@ public class ELGAMandateMetadataController extends AbstractController { String xmlMetadata = metadatabuilder.buildPVPMetadata(metadataConfig); //write response + byte[] content = xmlMetadata.getBytes("UTF-8"); + resp.setStatus(HttpServletResponse.SC_OK); + resp.setContentLength(content.length); resp.setContentType(MediaType.XML_UTF_8.toString()); - resp.getOutputStream().write(xmlMetadata.getBytes("UTF-8")); - resp.getOutputStream().close(); + resp.getOutputStream().write(content); } -- cgit v1.2.3