update DAT generation for part 1 of redirect/important fixes #135
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Provides the necessary server-side fixes for #131.
Overall strategy is to map any
$important,redirect
rules at serverside DAT creation into two separate filters: one placed into theimportants
list, the other one placed into theredirects
list without theimportant
option. This mirrors uBlock Origin'sredirect
-splitting behavior. Then, later, the client will be updated to check redirects regardless of whether or not an important filter was found. This will allowredirect
s to work even when a separateimportant
rule exists.Technically, the
redirect
option should not exist on the rule in theimportant
s list. However, it's left in place not to break older clients.This way, older clients will check for importants, find the
$important,redirect
rule, and use both options from it.Newer clients will check importants and redirects independently, find one in each, and use the corresponding options from each.
The client-side code can be updated much later to correctly split
$redirect
rules into one with an internal redirect flag, and one blocking rule, giving us trivial support for the$redirect-rule
option as well.