[whatwg/fetch] main fetch assumes file:// URLs are tuple origin (Issue #1908)

shannonbooth created an issue (whatwg/fetch#1908)

### What is the issue with the Fetch Standard?

https://fetch.spec.whatwg.org/#concept-main-fetch performs same origin checks and will end up falling through to throwing a NetworkError for non HTTP(S) schemes.

However, if current URL is a file:// scheme URL, then the same origin check should fail:

> -> request’s current URL’s origin is same origin with request’s origin, and request’s response tainting is "basic"
> -> request’s current URL’s scheme is "data"
> -> request’s mode is "navigate" or "websocket"

Which means that a NetworkError should be thrown normatively.

Probably file scheme URLs need to be special cased somehow in main fetch to allow for the implementation defined behaviour of file scheme URLs in scheme fetch instead.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/1908
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/issues/1908@github.com>

Received on Sunday, 25 January 2026 12:14:20 UTC