Response.blob() promise is rejected when the request URL is revoked after fetch
Categories
(Core :: DOM: Networking, defect, P2)
Tracking
()
People
(Reporter: peterho0218, Unassigned)
Details
(Whiteboard: [necko-triaged])
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36
Steps to reproduce:
Try the JavaScript code here: https://jsfiddle.net/Quicksilver0218/cbqxz43s/
- Click the file input field and select any file.
- Look at the console output.
Actual results:
The "Response.blob()" promise is rejected in Firefox.
Expected results:
The "Response.blob()" promise is resolved in Chrome, Edge and Opera.
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::DOM: Networking' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Comment 2•3 years ago
|
||
Anne, it's not entirely clear to me what the spec mandated behaviour is here
Reporter | ||
Comment 3•3 years ago
|
||
Other Body
's methods such as arrayBuffer()
, json()
, text()
are still working after revokeObjectURL()
. It seems that blob()
is the only difference.
Comment 4•3 years ago
|
||
This should work. In spec-theory we obtain a reference to the blob when the blob URL is parsed, so it getting revoked after that shouldn't influence the ability to fetch it or turn it into a new blob.
Updated•3 years ago
|
Comment 5•3 years ago
|
||
I didn't mean to mark this P1, not sure how that happened.
Description
•