NIFI-1835 - added text/xml to content viewer

Signed-off-by: Scott Aslan <scottyaslan@gmail.com>

This closes #2098
This commit is contained in:
Pierre Villard 2017-08-16 18:30:20 +02:00 committed by Scott Aslan
parent 0bcb19771f
commit 41984bed13
2 changed files with 3 additions and 1 deletions

View File

@ -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();

View File

@ -14,6 +14,7 @@
# limitations under the License.
application/xml
application/json
text/xml
text/plain
text/csv
avro/binary