aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--platform/firefox/frameModule.js2
-rw-r--r--platform/firefox/vapi-background.js9
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;
}