[whatwg/url] The origin of "blob:" URL containing inner "blob:" URL (Issue #770)

Different browsers return different `origin` values for such URLs.
For example, the results of parsing `blob:blob:http://host:123/path` are:

Browser or standard | `origin`
-|-
URL standard | `http://host:123`
Chromium | `null`
Firefox | `http://host:123`
Safari | `blob://`

I would prefer Chromium's behavior, even though it differs from the URL standard. There are two reasons for this:
1. Using the recursive [origin's algorithm of the URL standard](https://url.spec.whatwg.org/#origin), it is easy to cause a stack overflow by, for example, providing a URL with millions of `blob:` in it: `blob:blob:blob: ... blob:http://host:123/path`
2. Maybe I am wrong, but I think that a URL with many embedded `blob:` has no practical use.

If you agree, I can prepare PR and tests.

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

Message ID: <whatwg/url/issues/770@github.com>

Received on Monday, 8 May 2023 17:12:22 UTC