Browse Source

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

add missing ! and removed trailing whitespaces.
Mukul Mishra 9 years ago
parent
commit
6ce2be98b7
  1. 3
      src/core/network.js

3
src/core/network.js

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

Loading…
Cancel
Save