forked from mirrors/gecko-dev
Bug 1918301 - Don't display pdfs in pdf.js coming from a multipart response r=valentin, a=dsmith
Original Revision: https://phabricator.services.mozilla.com/D222122 Differential Revision: https://phabricator.services.mozilla.com/D222966
This commit is contained in:
parent
99a9aef629
commit
d7b973bf02
1 changed files with 7 additions and 0 deletions
|
|
@ -883,6 +883,13 @@ PdfStreamConverter.prototype = {
|
|||
},
|
||||
|
||||
getConvertedType(aFromType, aChannel) {
|
||||
if (aChannel instanceof Ci.nsIMultiPartChannel) {
|
||||
throw new Components.Exception(
|
||||
"PDF.js doesn't support multipart responses.",
|
||||
Cr.NS_ERROR_NOT_IMPLEMENTED
|
||||
);
|
||||
}
|
||||
|
||||
const HTML = "text/html";
|
||||
let channelURI = aChannel?.URI;
|
||||
// We can be invoked for application/octet-stream; check if we want the
|
||||
|
|
|
|||
Loading…
Reference in a new issue