From 5fdeb2a04f9c70f1b9d36363da7817e28c55aad1 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Tue, 26 Jan 2021 23:40:55 +0000 Subject: [pdf.js] Don't follow redirects on range requests for PDFs. --- basilisk/extensions/pdfjs/content/PdfJsNetwork.jsm | 1 + 1 file changed, 1 insertion(+) diff --git a/basilisk/extensions/pdfjs/content/PdfJsNetwork.jsm b/basilisk/extensions/pdfjs/content/PdfJsNetwork.jsm index c3aefec..4f85188 100644 --- a/basilisk/extensions/pdfjs/content/PdfJsNetwork.jsm +++ b/basilisk/extensions/pdfjs/content/PdfJsNetwork.jsm @@ -95,6 +95,7 @@ var NetworkManager = (function NetworkManagerClosure() { var rangeStr = args.begin + '-' + (args.end - 1); xhr.setRequestHeader('Range', 'bytes=' + rangeStr); pendingRequest.expectedStatus = 206; + xhr.channel.QueryInterface(Ci.nsIHttpChannel).redirectionLimit = 0; } else { pendingRequest.expectedStatus = 200; } -- cgit v1.2.3