[Bug]: WebKit decodes HTML from route.fulfill() as windows-1252, ignoring charset=utf-8
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- backend
調査の方向性
Start by tracing how WebKit handles responses created by route.fulfill() and how it sets response headers and encodes the body; compare that path with the real HTTP response behavior described here. The payload does not name source files or tests, so locate the relevant WebKit route fulfillment code and its tests. Done when the fulfilled HTML reports UTF-8 and preserves ₹, matching Chromium, Firefox, and WebKit's real server response.
索引モデルが issue の本文から書いたものです。
説明
Version
1.64.1 (also 1.58.2 and 1.65.0-alpha-2026-10-26)
Steps to reproduce
In an empty directory on Ubuntu 24.04, run:
npm init -y
npm install [email protected]
npx playwright-core install --with-deps webkit
Save the following as repro.mjs (UTF-8), then run node repro.mjs:
import { webkit } from "playwright-core";
const browser = await webkit.launch();
const page = await browser.newPage();
await page.route("http://fulfill.test/**", (route) =>
route.fulfill({ contentType: "text/html; charset=utf-8", body: "<!doctype html><p>₹</p>" }),
);
await page.goto("http://fulfill.test/");
console.log(await page.evaluate(() => [document.characterSet, document.querySelector("p").textContent]));
await browser.close();
Expected behavior
[ 'UTF-8', '₹' ], as in Chromium and Firefox, and as WebKit gives when a real HTTP server sends the same Content-Type: text/html; charset=utf-8 header.
Actual behavior
[ 'windows-1252', '₹' ]. It's the same with headers: { "Content-Type": "text/html; charset=utf-8" } instead of contentType, with a Buffer body, and with text/html;charset=UTF-8.
| Response | Chromium 156 | Firefox 157 | WebKit 27.2 |
|---|---|---|---|
route.fulfill({ contentType, body: string }) |
UTF-8 ₹ | UTF-8 ₹ | windows-1252 ₹ |
route.fulfill({ headers, body: string }) |
UTF-8 ₹ | UTF-8 ₹ | windows-1252 ₹ |
route.fulfill({ contentType, body: Buffer }) |
UTF-8 ₹ | UTF-8 ₹ | windows-1252 ₹ |
route.fulfill({ status: 200, headers: { "content-type": "text/html;charset=UTF-8" }, body: Buffer }) |
UTF-8 ₹ | UTF-8 ₹ | windows-1252 ₹ |
| Real HTTP server, same header | UTF-8 ₹ | UTF-8 ₹ | UTF-8 ₹ |
Additional context
We hit this in a test whose fulfilled page embeds a srcdoc iframe containing an inline script with non-ASCII text, allowed by a CSP sha256- hash. Incorrect decoding of the outer page changed the iframe's script text, so its hash no longer matched and WebKit refused to run it. Adding <meta charset="utf-8"> to the fulfilled page works around it.
Environment
System:
OS: Linux 7.2 Ubuntu 24.04.4 LTS 24.04.4 LTS (Noble Numbat)
CPU: (16) x64 AMD Ryzen 9 8945HS w/ Radeon 780M Graphics
Memory: 5.44 GB / 14.91 GB
Container: Yes
Binaries:
Node: 24.19.0 - /opt/acttoolcache/node/24.19.0/x64/bin/node
npm: 11.17.0 - /opt/acttoolcache/node/24.19.0/x64/bin/npm
Languages:
Bash: 5.2.21 - /usr/bin/bash
npmPackages:
playwright-core: ^1.64.1 => 1.64.1
- 主要言語
- TypeScript
- スター
- 98.5k
- フォーク
- 6.7k
- 平均マージ
- 16時間 10分
- マージ済み PR(30日)
- 305
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/playwright のほかの issue
-
[Bug]: Uncaught TypeError in captureSecurityDetails when APIRequestContext reuses a destroyed keep-alive socket対応中かも @microsoft-playwright-automation が今日担当しました。 オープンneeds-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
microsoft/playwright#43728 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
[Feature]: Set `this.name` in `TargetClosedError` constructor再び着手できるかも @LeonxLJX が 55 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンP3-collecting-feedback
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
microsoft/playwright#42522 · コメント 7 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
microsoft/playwright#43738 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 42/100
microsoft/playwright#43715 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
microsoft/playwright#43711 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
microsoft/playwright の issue をすべて見る
似ている issue
-
area:plugins area:security area:skills bug has repro
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
anthropics/claude-code#105911 ·
メンテナーはふだん 1 日以内に返信
-
openspec-apply-change skill: when blocked, may select a ready artifact unrelated to missingArtifactsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Fission-AI/OpenSpec#2165 ·
メンテナーはふだん 1 日以内に返信
-
🐞 bug 🧐 unconfirmed
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
Tencent/tdesign-vue-next#7032 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
gnosis/gnosis_vpn#661 ·
メンテナーはふだん 1 日以内に返信
-
content-freshness: staleOwnedContent doc comments still say 'complete receipt' (follow-up to #7912)オープンtriage:bug-verified
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
メンテナーはふだん 1 日以内に返信