-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove requirement for presence of type with
redirect=
option
Related issue: - #3590 Since the `redirect=` option was refactored into a modifier filter, presence of a type (`script`, `xhr`, etc.) is no longer a requirement.
- Loading branch information
Showing
2 changed files
with
3 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c6d0204
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So now for example
noop.js
redirect will not be applied toimage
requests automatically? Or all requests despite of their type will be redirected tonoop.js application/javascript
?c6d0204
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mime is not checked when redirecting to a web-accessible-resource (WAR), this not a change, this has been like this ever since I introduced redirecting to WAR, I made the assumption that the browser is able to sniff the mime from the WAR. When redirecting to a
data:
URI, the mime matters and no redirection will occur if the mime does not match the type of the request.c6d0204
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least in Chrome, headers are not very expressive:
I'm thinking about this because you did not included image type here: uBlockOrigin/uAssets@8c97149 and it was broken in stable build.
c6d0204
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why, I will need to investigate. There is no change I can think of in dev build which would explain this.
c6d0204
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I forgot, I relaxed the parser requirement in dev build, so it's the parser in stable which prevented the filter from being valid.