From 0d13de0cf350cd6f5bef985303fe41fd8d769731 Mon Sep 17 00:00:00 2001 From: Matt Gilman Date: Thu, 25 Feb 2016 09:43:25 -0500 Subject: [PATCH] NIFI-1539: - Comparing octet stream content type by using starts with and ignores case. --- .../main/java/org/apache/nifi/web/ContentViewerController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/java/org/apache/nifi/web/ContentViewerController.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/java/org/apache/nifi/web/ContentViewerController.java index 65f9353863..50ca101fc3 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/java/org/apache/nifi/web/ContentViewerController.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/java/org/apache/nifi/web/ContentViewerController.java @@ -154,7 +154,7 @@ public class ContentViewerController extends HttpServlet { // when standalone and we don't know the type is null as we were able to directly access the content bypassing the rest endpoint, // when clustered and we don't know the type set to octet stream since the content was retrieved from the node's rest endpoint - if (downloadableContent.getType() == null || downloadableContent.getType().equals(MediaType.OCTET_STREAM.toString())) { + if (downloadableContent.getType() == null || StringUtils.startsWithIgnoreCase(downloadableContent.getType(), MediaType.OCTET_STREAM.toString())) { // attempt to detect the content stream if we don't know what it is () final DefaultDetector detector = new DefaultDetector();