Created attachment 275457 [details] Reproducible test case Steps to repro: 1. Create a Blob 2. Create an object URL 3. Append a query param 4. Fetch it Expected: The Blob should be fetched normally, regardless of whether or not there are query params. Actual: The fetch resulted in a 404. Notes: There's no 404 in Firefox, but there is in Chrome. URL to repro: http://bl.ocks.org/nolanlawson/2d6cdd75df91b04c49706e9abe2222a7
Equivalent issue in Chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=600074
FWIW Edge throws an "Invalid argument" exception if you append a query string to a blob URL.
(In reply to comment #0) > Created attachment 275457 [details] > Reproducible test case > > Steps to repro: > > 1. Create a Blob > 2. Create an object URL > 3. Append a query param > 4. Fetch it > > Expected: > > The Blob should be fetched normally, regardless of whether or not there are > query params. This is not actually a forgone conclusion. There's a relevant spec here - https://www.w3.org/TR/FileAPI/#DefinitionOfScheme - that defines what a valid blob url is. A blob URL *MUST* consist of: - The blob: scheme - String representing the origin of the blob - The character "/" - String that is a UUID. A blob URL *MAY* consist of: - An optional fragment identifier The language here is very short. If it's not in a "must" or a "may" section, one can extrapolate that it's a "must not". > There's no 404 in Firefox, but there is in Chrome. It seems like Firefox might get this wrong. > FWIW Edge throws an "Invalid argument" exception if you append a query string to a blob URL. It seems like Edge gets this "the most right"
Good point - the spec seems to leave this open for interpretation. Although I filed this issue based on principle of least surprise; I assumed query parameters would just be ignored. Waiting to hear back from Chromium devs, but happy to file a bug on Firefox if there's a consensus on the interpretation. It's also pretty easy for web authors to work around, so not a very severe bug anyway.
FWIW in https://github.com/w3c/FileAPI/pull/92 I'm working on making the spec a lot more explicit around Blob URL behavior, and currently I'm leaning towards making the webkit/blink/edge behavior the expected behavior; i.e. making fetching blob URLs with query parameters a network error.
This bug should be closed since the spec change led to behavior being default to Webkit behavior, which was consistent across all browsers except Firefox. Please refer to http://crbug.com/600074 for further details. Please mark this as "Resolved Invalid" or "WON'TFIX". Thanks!
Thank you for checking!