Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"origin of a blob URL" is redundant/confusing #63

Closed
domenic opened this issue Feb 3, 2017 · 1 comment · Fixed by whatwg/url#371
Closed

"origin of a blob URL" is redundant/confusing #63

domenic opened this issue Feb 3, 2017 · 1 comment · Fixed by whatwg/url#371

Comments

@domenic
Copy link
Contributor

domenic commented Feb 3, 2017

The origin of a Blob URL
must be the same as the origin specified by the incumbent settings object at the time the method that created it was called.

This is stated as a normative statement, implying to me that blob URL's have some special origin that must be set at creation time.

However, the origin of a blob URL is instead normatively determined via the URL Standard. So this is just a statement of fact about what happens to be true according to the below algorithm, which is what creates blob URLs.

So it should be changed to a statement of fact, instead of a "must":

The origin of a Blob URL will be the same as the origin specified by the incumbent settings object at the time the method that created it was called.

Furthermore, this would be much clearer if instead of defining the new term "origin of a Blob URL", it just linked the first "origin" in this sentence to https://url.spec.whatwg.org/#concept-url-origin

@mkruisselbrink
Copy link
Collaborator

It's definitely confusing. Unfortunately currently the way the URL standard defines the origin of a blob URL does not always return the correct value, in particular for opaque origins (see whatwg/url#127). I think what we'll end up doing is store the origin of a blob URL in the Blob URL store and then using that from the URL standard to return the correct origin. But yes, there is lots of confusing, redundant and conflicting stuff with regard to blob URLs.

domenic added a commit that referenced this issue Feb 9, 2017
Also adds a warning about #63.
mkruisselbrink pushed a commit that referenced this issue Feb 9, 2017
* Stop using incumbent settings object

Also adds a warning about #63.

* "Issue" not "Warning"

* Fix local builds and do Bikeshed rebuild
mkruisselbrink added a commit to mkruisselbrink/url that referenced this issue Feb 2, 2018
mkruisselbrink added a commit to mkruisselbrink/url that referenced this issue Jan 4, 2019
mkruisselbrink added a commit that referenced this issue Jan 8, 2019
Also update "Origin of blob URLs" section since the algorithm that was
there will be part of the URL spec instead.

Part of the work to address #63
annevk pushed a commit to whatwg/url that referenced this issue Jan 14, 2019
In particular some blob: URLs representing an opaque origin could still be same origin with something. That only works if the origin is stored somewhere and is not obtained from the URL.

Tests: see #371 (comment).

This fixes #127, fixes #290 , fixes w3c/FileAPI#20, and fixes w3c/FileAPI#63.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants