From ec4de80345385931e9daf850208f3d41aea42b88 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Sun, 21 Jun 2020 13:31:13 -0400 Subject: [PATCH] Revert "Reject downloaded lists which are deemed truncated" This reverts commit de219dae264b4e52f1728993c8428dab7d5db60e. --- src/js/assets.js | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/src/js/assets.js b/src/js/assets.js index f74f073bf..efbb93535 100644 --- a/src/js/assets.js +++ b/src/js/assets.js @@ -771,22 +771,6 @@ const getRemote = async function(assetKey) { ? await api.fetchFilterList(contentURL) : await api.fetchText(contentURL); - // https://www.reddit.com/r/uBlockOrigin/comments/hbpo86/ - // Server sent a truncated list? If the new list is smaller than the - // currently cached one by more than 25%, assume a server error. - if ( - stringIsNotEmpty(result.content) && - typeof assetDetails.size === 'number' && - assetDetails.size !== 0 - ) { - const loss = 1 - result.content.length / assetDetails.size; - if ( loss > 0.25 ) { - result.statusCode = 206; - result.statusText = 'Partial Content'; - result.content = ''; - } - } - // Failure if ( stringIsNotEmpty(result.content) === false ) { let error = result.statusText; @@ -804,10 +788,7 @@ const getRemote = async function(assetKey) { content: result.content, url: contentURL }); - registerAssetSource(assetKey, { - error: undefined, - size: result.content.length - }); + registerAssetSource(assetKey, { error: undefined }); return reportBack(result.content); }