From be3f0cac07709ddb4fef2e3cb7fd3c9682a29de1 Mon Sep 17 00:00:00 2001 From: gorhill Date: Wed, 8 Oct 2014 14:42:09 -0400 Subject: [PATCH] this "fixes" #281 --- js/traffic.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/js/traffic.js b/js/traffic.js index 357501086..bbe6fdb2d 100644 --- a/js/traffic.js +++ b/js/traffic.js @@ -235,15 +235,20 @@ var cr410382Workaround = function(details) { return; } + // https://github.com/gorhill/uBlock/issues/281 + // Looks like Chrome 38 (but not 39) doesn't provide the expected request + // header `X-Requested-With`. Sigh. + var requestType = 'object'; + // Lookup "X-Requested-With" header: this will tell us whether the request // is of type "object". // Reference: https://code.google.com/p/chromium/issues/detail?id=145090 - var requestedWith = headerValue(details.requestHeaders, 'x-requested-with'); + //var requestedWith = headerValue(details.requestHeaders, 'x-requested-with'); // Reference: https://codereview.chromium.org/451923002/patch/120001/130008 - var requestType = requestedWith.indexOf('ShockwaveFlash') !== -1 ? - 'object' : - 'other'; + //var requestType = requestedWith.indexOf('ShockwaveFlash') !== -1 ? + // 'object' : + // 'other'; // Lookup the page store associated with this tab id. var pageStore = µb.pageStoreFromTabId(details.tabId);