blob() method: define behavior when get the MIME type return null #1802
Open
Description
What is the issue with the Fetch Standard?
In the blob() method:
The blob() method steps are to return the result of running consume body with this and the following step given a byte sequence bytes: return a Blob whose contents are bytes and whose type attribute is the result of get the MIME type with this.
If get the MIME type return a null value when it failed to extracting a MIME type from headers:
To get the MIME type, given a Request or Response object requestOrResponse:
4. Let mimeType be the result of extracting a MIME type from headers.
5. If mimeType is failure, then return null.
6. Return mimeType.
I think In blob()
method we need to either set type to an empty string or throw a TypeError like formData() does.
Metadata
Assignees
Labels
No labels