mirror of https://github.com/apache/nifi.git
NIFI-1835 - added text/xml to content viewer
Signed-off-by: Scott Aslan <scottyaslan@gmail.com> This closes #2098
This commit is contained in:
parent
0bcb19771f
commit
41984bed13
|
@ -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();
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
# limitations under the License.
|
||||
application/xml
|
||||
application/json
|
||||
text/xml
|
||||
text/plain
|
||||
text/csv
|
||||
avro/binary
|
||||
|
|
Loading…
Reference in New Issue