From 03cb546f29befdc959e551d742480550e24ad01a Mon Sep 17 00:00:00 2001 From: notmasteryet Date: Thu, 2 Feb 2012 21:06:13 -0600 Subject: [PATCH] FTP protocol support (#1165) --- src/core.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core.js b/src/core.js index cb601398e..a34954ab1 100644 --- a/src/core.js +++ b/src/core.js @@ -33,7 +33,8 @@ function getPdf(arg, callback) { var xhr = new XMLHttpRequest(); xhr.open('GET', params.url); xhr.mozResponseType = xhr.responseType = 'arraybuffer'; - xhr.expected = (params.url.indexOf('file:') === 0) ? 0 : 200; + xhr.expected = (params.url.indexOf('http:') === 0 || + params.url.indexOf('https:') === 0) ? 200 : 0; if ('progress' in params) xhr.onprogress = params.progress || undefined;