New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 600074 link

Starred by 4 users

Issue metadata

Status: WontFix
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Feature



Sign in to add a comment

Fetching blob URLs with query parameters result in 404

Reported by no...@nolanlawson.com, Apr 2 2016

Issue description

UserAgent: 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.
 
index.html
645 bytes View Download
Equivalent issue in WebKit: https://bugs.webkit.org/show_bug.cgi?id=156125
FWIW Edge throws an "Invalid argument" exception if you append a query string to a blob URL.

Comment 3 by beid...@gmail.com, 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.
Cc: michaeln@chromium.org jianli@chromium.org
Components: -Internals>Network Blink>FileAPI
Blob URLs are handled in storage/browser/blob, not the network stack; reassigning accordingly.
Labels: M-51 OS-Linux OS-Windows
Status: Untriaged (was: Unconfirmed)
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.
Cc: mek@chromium.org
I agree with beidson@ - blob URLs should be opaque for a variety of reasons (including future flexibility)

Where exactly does Edge throw?

Comment 7 by mek@chromium.org, 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.
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.
Labels: Hotlist-Interop
Labels: -Type-Bug Needs-Feedback Type-Feature
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.

Comment 11 by dk...@chromium.org, Apr 21 2016

Owner: mek@chromium.org
Status: Assigned (was: Untriaged)
Assigning to mek to resolve the spec inconsistencies. @mek feel free to move to someone else if they're better suited :)

Comment 12 by mek@chromium.org, 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.

Comment 13 by mek@chromium.org, Jan 30 2018

Status: WontFix (was: Assigned)
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).
Components: Blink>Storage>FileAPI
Components: -Blink>FileAPI
 Issue 907452  has been merged into this issue.
Thanks!

Sign in to add a comment