diff options
author | gorhill <rhill@raymondhill.net> | 2015-08-29 18:35:08 -0400 |
---|---|---|
committer | gorhill <rhill@raymondhill.net> | 2015-08-29 18:35:08 -0400 |
commit | 583daddbf8114bb0d12cba9f95d1b16c19e3a459 (patch) | |
tree | 720dc70fc3fb0df4e3fd1d4454dfd45de60fd67f /platform | |
parent | cf9869877de49399f3204e0a256b823863b04833 (diff) | |
download | uBlock-583daddbf8114bb0d12cba9f95d1b16c19e3a459.zip uBlock-583daddbf8114bb0d12cba9f95d1b16c19e3a459.tar.gz uBlock-583daddbf8114bb0d12cba9f95d1b16c19e3a459.tar.bz2 |
this fixes #654
Diffstat (limited to 'platform')
-rw-r--r-- | platform/firefox/frameModule.js | 2 | ||||
-rw-r--r-- | platform/firefox/vapi-background.js | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/platform/firefox/frameModule.js b/platform/firefox/frameModule.js index ac2b4ed..65de7a9 100644 --- a/platform/firefox/frameModule.js +++ b/platform/firefox/frameModule.js @@ -205,6 +205,8 @@ const contentObserver = { url: location.spec }; + //console.log('shouldLoad: type=' + type' ' + 'url=' + location.spec); + if ( typeof messageManager.sendRpcMessage === 'function' ) { // https://bugzil.la/1092216 messageManager.sendRpcMessage(this.cpMessageName, details); diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js index deb7890..6790d98 100644 --- a/platform/firefox/vapi-background.js +++ b/platform/firefox/vapi-background.js @@ -1752,10 +1752,10 @@ var httpObserver = { //console.log('http-on-opening-request:', URI.spec); var pendingRequest = this.lookupPendingRequest(URI.spec); + var rawtype = channel.loadInfo && channel.loadInfo.contentPolicyType || 1; // Behind-the-scene request if ( pendingRequest === null ) { - var rawtype = channel.loadInfo && channel.loadInfo.contentPolicyType || 1; if ( this.handleRequest(channel, URI, { tabId: vAPI.noTabId, rawtype: rawtype }) ) { return; } @@ -1768,6 +1768,13 @@ var httpObserver = { return; } + // https://github.com/gorhill/uBlock/issues/654 + // Use the request type from the HTTP observer point of view, it's most + // likely the most accurate. + if ( rawtype !== 1 ) { + pendingRequest.rawtype = rawtype; + } + if ( this.handleRequest(channel, URI, pendingRequest) ) { return; } |