Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

feat(firefox): roll to r1543 (#42524)

microsoft-playwright-automation[bot]34d23028f365
diff --git a/browser_patches/firefox/juggler/NetworkObserver.js b/browser_patches/firefox/juggler/NetworkObserver.js
index ed048cc432..2b4b3c5463 100644
--- a/browser_patches/firefox/juggler/NetworkObserver.js
+++ b/browser_patches/firefox/juggler/NetworkObserver.js
@@ -909,7 +909,12 @@ class ResponseStorage {
// Note: fulfilled request comes with decoded body right away.
if ((request.httpChannel instanceof Ci.nsIEncodedChannel) && request.httpChannel.contentEncodings && !request.httpChannel.applyConversion && !request._fulfilled) {
const encodingHeader = request.httpChannel.getResponseHeader("Content-Encoding");
- encodings = encodingHeader.split(/\s*\t*,\s*\t*/);
+ // Firefox itself skips "identity" and empty encodings when applying content
+ // conversions, and there is no stream converter registered for them.
+ encodings = encodingHeader.split(/\s*\t*,\s*\t*/).filter(encoding => {
+ const normalized = encoding.trim().toLowerCase();
+ return normalized && normalized !== 'identity' && normalized !== 'x-identity';
+ });
}
this._responses.set(request.requestId, {
body,
diff --git a/packages/playwright-core/browsers.json b/packages/playwright-core/browsers.json
index aeefe9c382..5ed62af55d 100644
--- a/packages/playwright-core/browsers.json
+++ b/packages/playwright-core/browsers.json
@@ -17,7 +17,7 @@
},
{
"name": "firefox",
- "revision": "1542",
+ "revision": "1543",
"installByDefault": true,
"browserVersion": "155.0",
"title": "Firefox"