anfragment / zen

Simple, free and efficient ad-blocker and privacy guard for Windows, macOS and Linux
https://zenprivacy.net
MIT License
2.39k stars 60 forks source link

contenttype modifier doesn't match Content-Type headers with parameters #118

Closed anfragment closed 1 month ago

anfragment commented 2 months ago

The Content-Type header values can potentially contain parameters after a semicolon, in addition to the media type. Our $contenttype modifier implementation doesn't take that into account.

References:

anfragment commented 2 months ago

In case anyone wants to work on this, I can walk you through a solution.

Noahnut commented 1 month ago

I think I can try

anfragment commented 1 month ago

@Noahnut thanks for offering help, but it turns out $contenttype determines the type base on requests' Sec-Fetch-Dest header instead of response's Content-Type. The issue is incorrect.