TechnikEmpire / DistillNET

DistillNET is a library for matching and filtering HTTP requests and HTML response content using the Adblock Plus Filter format.
Mozilla Public License 2.0
16 stars 4 forks source link

Improve the referer operator recently added #9

Closed TechnikEmpire closed 7 years ago

TechnikEmpire commented 7 years ago

Because the referer field isn't always just the domain name, and may be a full URL, we need to either:

a) Parse the referer as a Uri object and compare against the host property afterward. b) Make the referer arguments get parsed and processed as rules themselves. So basically the operator here would become a sort of recursive url filter itself. This would definitely be cooler and more powerful, but not necessarily good for performance.

TechnikEmpire commented 7 years ago

We're gonna opt for option A here. So, referer arg, if supplied, should only ever be an exact domain.

TechnikEmpire commented 7 years ago

Changed this to a bug because it was a failure in implementing correctly in the first place due to a lack of understanding.