[whatwg/xhr] Should we be pinning Files (#79)

Ref https://github.com/w3c/web-platform-tests/blob/master/FileAPI/blob/Blob-XHR-revoke.html



```js
    var blob = new Blob(["test"]);
    var url = URL.createObjectURL(blob);
    var xhr = new XMLHttpRequest();
    xhr.open("GET", url);

    URL.revokeObjectURL(url);
    xhr.onload = function() {console.log(xhr.response)}
    xhr.send();
```

Firefox has interesting behavior when it comes to revoked blob URIs.

If, for example, you call `xhr.open()` on  a nonrevoked blob URI, that URI can be fetched via XHR even after it is revoked. Newer fetches (via XHR or otherwise) cannot access it, however, only fetches opened before the revocation.

Additionally, calling `xhr.open()` on a revoked URI will error. I'm not so fond of this behavior myself, I don't think `open()` should be erroring on valid but nonexistant URIs since that can be unexpected behavior -- it should instead wait for the `send()` and error then.


We should discuss getting some or all of this behavior into the spec, or removing it if not desired.

cc @izgzhen @baku @annevk

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

Received on Friday, 15 July 2016 11:19:35 UTC