From a24d22cd0f1b10ace1c0c73d8aff991cec400de1 Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 6 Feb 2015 12:20:30 -0500 Subject: [PATCH] this fixes #708 --- src/js/assets.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/js/assets.js b/src/js/assets.js index 733871842..41e75ab7b 100644 --- a/src/js/assets.js +++ b/src/js/assets.js @@ -820,6 +820,13 @@ var readExternalAsset = function(path, callback) { var onExternalFileLoaded = function() { this.onload = this.onerror = null; + // https://github.com/gorhill/uBlock/issues/708 + // A successful download should never return an empty file: turn this + // into an error condition. + if ( stringIsNotEmpty(this.responseText) === false ) { + onExternalFileError(); + return; + } //console.log('µBlock> readExternalAsset("%s") / onExternalFileLoaded1()', path); cachedAssetsManager.save(path, this.responseText); reportBack(this.responseText);