diff options
author | gorhill <rhill@raymondhill.net> | 2015-01-17 07:53:19 -0500 |
---|---|---|
committer | gorhill <rhill@raymondhill.net> | 2015-01-17 07:53:19 -0500 |
commit | 94453ed878f60f8245587a19ae51341478b1896d (patch) | |
tree | 44824a17654e843d6b1d2020160172ad96d22d81 | |
parent | 3ab9aa46b007cc503257348bca753b75c089c023 (diff) | |
download | uBlock-94453ed878f60f8245587a19ae51341478b1896d.zip uBlock-94453ed878f60f8245587a19ae51341478b1896d.tar.gz uBlock-94453ed878f60f8245587a19ae51341478b1896d.tar.bz2 |
this fixes #519
-rw-r--r-- | src/js/static-net-filtering.js | 8 | ||||
-rw-r--r-- | src/js/traffic.js | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/js/static-net-filtering.js b/src/js/static-net-filtering.js index 17b92e0..8013e3c 100644 --- a/src/js/static-net-filtering.js +++ b/src/js/static-net-filtering.js @@ -1812,6 +1812,13 @@ FilterContainer.prototype.matchStringExactType = function(context, requestURL, r /******************************************************************************/ FilterContainer.prototype.matchString = function(context) { + // https://github.com/gorhill/uBlock/issues/519 + // Use exact type match for anything beyond `other` + var type = typeNameToTypeValue[context.requestType]; + if ( type > 8 << 4 ) { + return this.matchStringExactType(context, context.requestURL, context.requestType); + } + // https://github.com/gorhill/httpswitchboard/issues/239 // Convert url to lower case: // `match-case` option not supported, but then, I saw only one @@ -1845,7 +1852,6 @@ FilterContainer.prototype.matchString = function(context) { // This will be used by hostname-based filters pageHostname = context.pageHostname || ''; - var type = typeNameToTypeValue[context.requestType]; var categories = this.categories; var bucket; diff --git a/src/js/traffic.js b/src/js/traffic.js index 0d16dd9..3b807fd 100644 --- a/src/js/traffic.js +++ b/src/js/traffic.js @@ -270,6 +270,8 @@ var onHeadersReceived = function(details) { µb.localSettings.blockedRequestCount++; µb.updateBadgeAsync(tabId); + pageStore.logBuffer.writeOne(pageStore, result); + details.responseHeaders.push({ 'name': 'Content-Security-Policy', 'value': "script-src 'unsafe-eval' *" |