1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-06 09:37:12 +02:00

Fix regression in response body filtering

This commit is contained in:
Raymond Hill 2024-01-26 13:52:17 -05:00
parent 6148d450ac
commit 94ec65b7db
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -551,7 +551,7 @@ const onHeadersReceived = function(details) {
} }
} }
if ( jobs.length !== 0 ) { if ( jobs.length !== 0 ) {
bodyFilterer.doFilter(fctxt, jobs); bodyFilterer.doFilter(details.requestId, fctxt, jobs);
} }
} }
@ -886,10 +886,10 @@ const bodyFilterer = (( ) => {
this.str = s; this.str = s;
this.modified = true; this.modified = true;
} }
static doFilter(fctxt, jobs) { static doFilter(requestId, fctxt, jobs) {
if ( jobs.length === 0 ) { return; } if ( jobs.length === 0 ) { return; }
const session = new Session(fctxt, mime, charset, jobs); const session = new Session(fctxt, mime, charset, jobs);
session.stream = browser.webRequest.filterResponseData(session.id); session.stream = browser.webRequest.filterResponseData(requestId);
session.stream.ondata = onStreamData; session.stream.ondata = onStreamData;
session.stream.onstop = onStreamStop; session.stream.onstop = onStreamStop;
session.stream.onerror = onStreamError; session.stream.onerror = onStreamError;