xhr
xhr copied to clipboard
interop: blob with empty content type is not converted to text/xml
According to https://xhr.spec.whatwg.org/#response-mime-type:
If mimeType is failure, then set mimeType to text/xml.
Note: The content-type of the blob is set to "" (an invalid mime type) when the input type is not set or is invalid.
| Test | Firefox | Chrome | Safari |
|---|---|---|---|
| no content type | text/xml |
null |
"" |
| bad content type | text/xml |
null |
"" |
Related to: https://github.com/whatwg/fetch/issues/1464 and https://github.com/whatwg/fetch/issues/1436
I'm not entirely sure how to interpret this. Are you simultaneously pointing out that it's inconsistent with blobs and that browsers are not aligned on this?
Ah, sorry just that browsers are not aligned on this.
I see, I kinda suspect this already has test coverage so unless that's not the case or someone wants to make a change to the spec this might be a good fit for the Interop effort?