From 36333bf7ba6595f7edf29a6c60f2cb8cf21581a9 Mon Sep 17 00:00:00 2001
From: Pawel GUTOWSKI <Pawel.GUTOWSKI@ext.ec.europa.eu>
Date: Wed, 8 Nov 2017 14:57:01 +0100
Subject: [PATCH] EDELIVERY-2258 Fixed charset in HTTP header after merge of
 EDELIVERY-2771

---
 .../ec/edelivery/smp/controllers/ServiceGroupController.java   | 3 +--
 .../edelivery/smp/controllers/ServiceMetadataController.java   | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/smp-webapp/src/main/java/eu/europa/ec/edelivery/smp/controllers/ServiceGroupController.java b/smp-webapp/src/main/java/eu/europa/ec/edelivery/smp/controllers/ServiceGroupController.java
index 8afcdefa7..69ec28997 100644
--- a/smp-webapp/src/main/java/eu/europa/ec/edelivery/smp/controllers/ServiceGroupController.java
+++ b/smp-webapp/src/main/java/eu/europa/ec/edelivery/smp/controllers/ServiceGroupController.java
@@ -41,7 +41,6 @@ import java.util.List;
 
 import static eu.europa.ec.smp.api.Identifiers.asString;
 import static org.apache.commons.lang3.StringUtils.isNotBlank;
-import static org.springframework.http.MediaType.TEXT_XML_VALUE;
 import static org.springframework.http.ResponseEntity.created;
 import static org.springframework.http.ResponseEntity.ok;
 
@@ -76,7 +75,7 @@ public class ServiceGroupController {
     private BaseServiceMetadataInterfaceImpl serviceMetadataService;
 
 
-    @GetMapping(produces = TEXT_XML_VALUE)
+    @GetMapping(produces = "text/xml; charset=UTF-8")
     public ServiceGroup getServiceGroup(@PathVariable String serviceGroupId) {
         log.info("GET ServiceGrooup: {}", serviceGroupId);
 
diff --git a/smp-webapp/src/main/java/eu/europa/ec/edelivery/smp/controllers/ServiceMetadataController.java b/smp-webapp/src/main/java/eu/europa/ec/edelivery/smp/controllers/ServiceMetadataController.java
index d18abac26..0c989655a 100644
--- a/smp-webapp/src/main/java/eu/europa/ec/edelivery/smp/controllers/ServiceMetadataController.java
+++ b/smp-webapp/src/main/java/eu/europa/ec/edelivery/smp/controllers/ServiceMetadataController.java
@@ -33,7 +33,6 @@ import java.io.UnsupportedEncodingException;
 
 import static eu.europa.ec.smp.api.Identifiers.asDocumentId;
 import static eu.europa.ec.smp.api.Identifiers.asParticipantId;
-import static org.springframework.http.MediaType.TEXT_XML_VALUE;
 import static org.springframework.http.ResponseEntity.created;
 import static org.springframework.http.ResponseEntity.ok;
 
@@ -59,7 +58,7 @@ public class ServiceMetadataController {
     @Autowired
     private ServiceMetadataPathBuilder pathBuilder;
 
-    @GetMapping(produces = TEXT_XML_VALUE)
+    @GetMapping(produces = "text/xml; charset=UTF-8")
     public String getServiceMetadata(@PathVariable String serviceGroupId,
                                      @PathVariable String serviceMetadataId) throws TransformerException, UnsupportedEncodingException {
 
-- 
GitLab