From 94ec65b7db59c49ad67303d7eb4605916e02c687 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Fri, 26 Jan 2024 13:52:17 -0500 Subject: [PATCH] Fix regression in response body filtering --- src/js/traffic.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/traffic.js b/src/js/traffic.js index bf34fd44c..02043ac1e 100644 --- a/src/js/traffic.js +++ b/src/js/traffic.js @@ -551,7 +551,7 @@ const onHeadersReceived = function(details) { } } if ( jobs.length !== 0 ) { - bodyFilterer.doFilter(fctxt, jobs); + bodyFilterer.doFilter(details.requestId, fctxt, jobs); } } @@ -886,10 +886,10 @@ const bodyFilterer = (( ) => { this.str = s; this.modified = true; } - static doFilter(fctxt, jobs) { + static doFilter(requestId, fctxt, jobs) { if ( jobs.length === 0 ) { return; } 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.onstop = onStreamStop; session.stream.onerror = onStreamError;