From b0313316ccce3def46e565ecf658540bec6c520e Mon Sep 17 00:00:00 2001 From: bizzguy Date: Tue, 18 May 2021 10:22:27 -0700 Subject: [PATCH] Network Plugin: Add xhtml and xml to 'Textual' check (#2336) Summary: Network requests that return a "Content-Type" of 'application/xhtml+xml' are currently being treated as binary data when they should be treated as text. ## Changelog Network Plugin - treat "Content-Type" of 'application/xhtml+xml' as text Pull Request resolved: https://github.com/facebook/flipper/pull/2336 Test Plan: Using an API that return "Content-Type" of 'application/xhtml+xml' , verified that the response data in sidebar appears as text rather than '(binary data)' Reviewed By: nikoant Differential Revision: D28478695 Pulled By: mweststrate fbshipit-source-id: ed60c8301dbd0cf65924a80d9e6a5800a59c6bb8 --- desktop/plugins/public/network/utils.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/desktop/plugins/public/network/utils.tsx b/desktop/plugins/public/network/utils.tsx index 9d6c4515a..81daac04e 100644 --- a/desktop/plugins/public/network/utils.tsx +++ b/desktop/plugins/public/network/utils.tsx @@ -39,7 +39,8 @@ export function isTextual(headers?: Array
): boolean { contentType.startsWith('application/json') || contentType.startsWith('multipart/') || contentType.startsWith('message/') || - contentType.startsWith('image/svg') + contentType.startsWith('image/svg') || + contentType.startsWith('application/xhtml+xml') ); }