Changes between Version 1 and Version 8 of Ticket #6994


Ignore:
Timestamp:
10/18/2018 02:21:08 AM (12 months ago)
Author:
jsonesen
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #6994

    • Property Cc jsonesen added
    • Property Owner set to jsonesen
  • Ticket #6994 – Description

    v1 v8  
    22About half of all blocking/whitelist filters have (1) no content type, (2) no domain/sitekey, and (3) no third-party flag. As long as the request's location matches the pattern in the filter, it is a match. For these filters, there should be a "shortcut" version of the `RegExpFilter.prototype.matches` method that checks only the location. When such filters are added to the matcher, it should keep them separately so they can be processed separately (with the shortcut version) for each call to the `_checkEntryMatch` method. 
    33 
    4 Additionally, in `_checkEntryMatch`, if `typeMask & RegExpFilter.prototype.contentType == 0` is true, these filters should be skipped entirely. 
     4 
    55 
    66=== What to change === 
    7 [TBD] 
     7Add a `isLocationOnly` property to the RegExpFilter class and a new `locationFilterByKeyword` to the constructor. 
     8 
     9Change `_checkEntryMatch` in `lib/matcher.js` to initially loop through location only filters checking for matches using `location.test(filter.regexp)` Additionally, in `_checkEntryMatch`, if `typeMask & RegExpFilter.prototype.contentType == 0` is true, these filters should be skipped entirely.