From 6ce2be98b7937dadc00c364ff78829441d0bbb57 Mon Sep 17 00:00:00 2001 From: Mukul Mishra Date: Sun, 13 Nov 2016 00:42:32 +0530 Subject: [PATCH] Fix #7701: additional check for http/https protocols to fix unsafe header request. add missing ! and removed trailing whitespaces. --- src/core/network.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/network.js b/src/core/network.js index d59e8c2e7ff2e..a299afefef8ae 100644 --- a/src/core/network.js +++ b/src/core/network.js @@ -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') {