diff --git a/orcid-api-common/src/main/java/org/orcid/api/common/writer/rdf/RDFMessageBodyWriter.java b/orcid-api-common/src/main/java/org/orcid/api/common/writer/rdf/RDFMessageBodyWriter.java index b238f6498a1..dffa7c41ebf 100644 --- a/orcid-api-common/src/main/java/org/orcid/api/common/writer/rdf/RDFMessageBodyWriter.java +++ b/orcid-api-common/src/main/java/org/orcid/api/common/writer/rdf/RDFMessageBodyWriter.java @@ -173,7 +173,8 @@ public void writeTo(OrcidMessage xml, Class type, Type genericType, Annotatio person.addProperty(familyName, personalDetails.getFamilyName().getContent()); } - if (mediaType.toString().contains(APPLICATION_RDFXML)) { + MediaType rdfXml = new MediaType("application", "rdf+xml"); + if (mediaType.isCompatible(rdfXml)) { m.write(entityStream); } else { // Must be Turtle or N3 then?