Fix #7701: additional check for http/https protocols to fix unsafe header request.

add missing ! and removed trailing whitespaces.
This commit is contained in:
Mukul Mishra 2016-11-13 00:42:32 +05:30
parent 7ec8adc712
commit 6ce2be98b7

View File

@ -375,6 +375,9 @@ if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('FIREFOX || MOZCENTRAL')) {
}
var networkManager = this._manager;
if (!networkManager.isHttp) {
return false;
}
var fullRequestXhrId = this._fullRequestId;
var fullRequestXhr = networkManager.getRequestXhr(fullRequestXhrId);
if (fullRequestXhr.getResponseHeader('Accept-Ranges') !== 'bytes') {