summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-01-26 23:40:55 +0000
committerMoonchild <moonchild@palemoon.org>2021-01-26 23:40:55 +0000
commit5fdeb2a04f9c70f1b9d36363da7817e28c55aad1 (patch)
tree0be14d2eca7a3b711eac04468a1272b14d5cbc7a
parent3b12c85a0e68b963cbabcdc2433a13f4f06c19ce (diff)
downloadbasilisk-5fdeb2a04f9c70f1b9d36363da7817e28c55aad1.tar.gz
[pdf.js] Don't follow redirects on range requests for PDFs.
-rw-r--r--basilisk/extensions/pdfjs/content/PdfJsNetwork.jsm1
1 files changed, 1 insertions, 0 deletions
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;
}