mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Only perform range requests for identity Content-Encoding
This commit is contained in:
parent
8e4d9e9aa0
commit
e0d4b322cf
2 changed files with 30 additions and 7 deletions
|
@ -183,6 +183,12 @@ var WorkerMessageHandler = {
|
|||
return;
|
||||
}
|
||||
|
||||
var contentEncoding =
|
||||
fullRequestXhr.getResponseHeader('Content-Encoding') || 'identity';
|
||||
if (contentEncoding !== 'identity') {
|
||||
return;
|
||||
}
|
||||
|
||||
var length = fullRequestXhr.getResponseHeader('Content-Length');
|
||||
length = parseInt(length, 10);
|
||||
if (!isInt(length)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue