Fetching blob URLs with query parameters result in 404
Reported by
no...@nolanlawson.com,
Apr 2 2016
|
||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:47.0) Gecko/20100101 Firefox/47.0 Example URL: http://bl.ocks.org/nolanlawson/2d6cdd75df91b04c49706e9abe2222a7 Steps to reproduce the problem: 1. Create a Blob 2. Create an object URL 3. Append a query param 4. Fetch it What is the expected behavior? The Blob should be fetched normally, regardless of whether or not there are query params. What went wrong? The fetch resulted in a 404. Did this work before? N/A Chrome version: Version 51.0.2696.0 canary (64-bit) Channel: n/a OS Version: OS X 10.11 Flash Version: Shockwave Flash 21.0 r0 There's no 404 in Firefox, but there is in WebKit.
,
Apr 2 2016
FWIW Edge throws an "Invalid argument" exception if you append a query string to a blob URL.
,
Apr 2 2016
Over in WebKit land, we're not convinced this is a bug. The spec seems to make no allowance for this, and Edge arguably gets this the most correct by throwing that exception. See my comment here: https://bugs.webkit.org/show_bug.cgi?id=156125#c3 Since Firefox is the odd-man out, and if we agree the spec agrees with WebKit/Blink/Edge, perhaps we should actually file a bug on Firefox to change.
,
Apr 4 2016
Blob URLs are handled in storage/browser/blob, not the network stack; reassigning accordingly.
,
Apr 6 2016
Able to reproduce the issue on Mac 10.11.3 using canary 51.0.2700.0. This is a non-regression issues since M 30.0.1549.0 on Mac 10.11.3, Win 7 and Ubuntu 14.04.
,
Apr 6 2016
I agree with beidson@ - blob URLs should be opaque for a variety of reasons (including future flexibility) Where exactly does Edge throw?
,
Apr 6 2016
This seems to be something where the File API and URL specs are in disagreement. The File API spec indeed seems to agree with the behavior in blink/webkit/edge, but also says that it is not normative about behavior related to fetching blob urls (deferring to the fetch and url specs for normative behavior). The way URL parsing is written in the URL spec (https://url.spec.whatwg.org/#url-parsing) it seems to allow for query parameters (that should be ignored) and even extra path components (it only look at the first string in the urls path). So at least we should figure out which behavior is desired and make the various specs consistent with that behavior.
,
Apr 13 2016
In practical terms, parameters can be appended to blob urls as # fragments, so no functionality is lost with the inability to pass them as query parameters. I think the thinking was that ? parameters are usually interpreted by a remote agency and since there is no remote agency behind a blob url, query parameters shouldn't apply.
,
Apr 13 2016
,
Apr 19 2016
Needs feedback about a spec change prior to doing any work on this. Personally, I don't see a reason to change to the spec or our code but ultimately its a spec question.
,
Apr 21 2016
Assigning to mek to resolve the spec inconsistencies. @mek feel free to move to someone else if they're better suited :)
,
Dec 6 2017
FWIW in https://github.com/w3c/FileAPI/pull/92 I've started on clarifying blob URL behavior better, and at least for now I'm leaning towards making the chrome/webkit/edge behavior explicit, and thus making fetching blob URLs with query parameters an error. Please weigh in there if you have different opinions.
,
Jan 30 2018
The spec was updated to make the described behavior correct (modulo whether fetching an invalid blob URL returns a 404 or triggers a network error, but that's a different bug).
,
Jun 15 2018
,
Jun 15 2018
,
Nov 21
Issue 907452 has been merged into this issue.
,
Dec 28
Thanks! |
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by no...@nolanlawson.com
, Apr 2 2016