whatwg / xhr

XMLHttpRequest Standard
https://xhr.spec.whatwg.org/
Other
314 stars 129 forks source link

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

Open dlrobertson opened 1 year ago

dlrobertson commented 1 year ago

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

annevk commented 1 year ago

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?

dlrobertson commented 1 year ago

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

annevk commented 1 year ago

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?