fix(webkit): do not report blob: URLs to route handlers - #42738
Mohan Ram (mohanram-dev) wants to merge 1 commit into
Conversation
Test results for "tests 1"3 failed 5 flaky51728 passed, 1247 skipped Merge workflow run. |
Test results for "MCP"2 failed 8562 passed, 1446 skipped Merge workflow run. |
| // WebKit started dispatching network events for about:blank after https://commits.webkit.org/292206@main. | ||
| if (event.request.url.startsWith('about:')) | ||
| return; | ||
| if (event.request.url.startsWith('blob:')) |
There was a problem hiding this comment.
this does a lot more than just preventing routing blob: and drops all network activity for blob:
|
closing per #42727 (comment) |
Fixes #42727.
Description
In WebKit,
blob:URLs were being dispatched topage.routehandlers, whereas Chromium and Firefox do not dispatch network interception forblob:URLs.In
wkPage.tsandwvPage.ts,_onRequestWillBeSentalready filters outdata:andabout:URLs, but did not excludeblob:URLs. Whenevent.request.url.startsWith('blob:')is skipped in_onRequestWillBeSent, any subsequentrequestInterceptedevent continues cleanly without invoking route handlers orpage.on('request').Changes
packages/playwright-core/src/server/webkit/wkPage.ts: return early in_onRequestWillBeSentifevent.request.url.startsWith('blob:').packages/playwright-core/src/server/webkit/webview/wvPage.ts: return early in_onRequestWillBeSentifevent.request.url.startsWith('blob:').tests/page/page-route.spec.ts: add regression test validating thatblob:URLs from web workers andfetch()are not reported to route handlers.