diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-content-viewer/src/main/java/org/apache/nifi/web/StandardContentViewerController.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-content-viewer/src/main/java/org/apache/nifi/web/StandardContentViewerController.java index cf532c3a28..405b11c007 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-content-viewer/src/main/java/org/apache/nifi/web/StandardContentViewerController.java +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-content-viewer/src/main/java/org/apache/nifi/web/StandardContentViewerController.java @@ -53,6 +53,7 @@ public class StandardContentViewerController extends HttpServlet { static { supportedMimeTypes.add("application/json"); supportedMimeTypes.add("application/xml"); + supportedMimeTypes.add("text/xml"); supportedMimeTypes.add("text/plain"); supportedMimeTypes.add("text/csv"); supportedMimeTypes.add("application/avro-binary"); @@ -85,7 +86,7 @@ public class StandardContentViewerController extends HttpServlet { final ObjectMapper mapper = new ObjectMapper(); final Object objectJson = mapper.readValue(content.getContentStream(), Object.class); formatted = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(objectJson); - } else if ("application/xml".equals(contentType)) { + } else if ("application/xml".equals(contentType) || "text/xml".equals(contentType)) { // format xml final StringWriter writer = new StringWriter(); diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-content-viewer/src/main/webapp/META-INF/nifi-content-viewer b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-content-viewer/src/main/webapp/META-INF/nifi-content-viewer index e5e25f0f9f..f105ca2f0b 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-content-viewer/src/main/webapp/META-INF/nifi-content-viewer +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-content-viewer/src/main/webapp/META-INF/nifi-content-viewer @@ -14,6 +14,7 @@ # limitations under the License. application/xml application/json +text/xml text/plain text/csv avro/binary