xhr icon indicating copy to clipboard operation
xhr copied to clipboard

interop: blob with empty content type is not converted to text/xml

Open dlrobertson opened this issue 3 years ago • 3 comments

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

dlrobertson avatar Oct 06 '22 14:10 dlrobertson

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?

annevk avatar Oct 07 '22 13:10 annevk

Ah, sorry just that browsers are not aligned on this.

dlrobertson avatar Oct 07 '22 13:10 dlrobertson

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?

annevk avatar Oct 07 '22 13:10 annevk