Bug 1918874 - Don't display json in the json viewer coming from a multipart response. r=devtools-reviewers,ochameau.

Differential Revision: https://phabricator.services.mozilla.com/D222616
This commit is contained in:
Calixte 2024-09-20 14:48:36 +00:00
parent 155c74eb98
commit 192fd83525

View File

@ -72,7 +72,13 @@ Converter.prototype = {
asyncConvertData(fromType, toType, listener) {
this.listener = listener;
},
getConvertedType() {
getConvertedType(_fromType, channel) {
if (channel instanceof Ci.nsIMultiPartChannel) {
throw new Components.Exception(
"JSONViewer doesn't support multipart responses.",
Cr.NS_ERROR_FAILURE
);
}
return "text/html";
},