Closed CYBAI closed 1 year ago
I think the main thing we want to do here is to change "this's MIME type" to be more obviously an algorithm invocation. I think that would address any potential confusion. But this would be an editorial change as in principle this already makes the relevant requirements.
I'd like to try working on the clarification. 🙋
I was wondering if https://fetch.spec.whatwg.org/#concept-body-mime-type is the right place to add the algorithm invocation 🤔 However, body
doesn't have an associated headers
.
Thus, maybe I should update https://fetch.spec.whatwg.org/#ref-for-concept-body-mime-type%E2%91%A2 and https://fetch.spec.whatwg.org/#ref-for-concept-body-mime-type%E2%91%A3 to run the algorithm instead?
That's great.
I think there are two approaches here:
The standalone algorithm makes the mixin less generic, but that's not necessarily a bad thing I think. And it's probably the most clear.
Thank you! Sounds good to me! I will try with this approach.
Currently, the spec of
blob()
sayshowever, it doesn't mention when the body is a Blob with type, browsers should respect the blob's type or the Content-Type in headers.
there's a test in Chromium and WebKit.
Chromium and WebKit are respecting blob's type so they could pass the test now. For Gecko, it fails to run the test because it would respect the headers' content-type.
With confirming with @annevk in https://github.com/WebKit/WebKit/pull/12376#issuecomment-1503175231, it seems the
blob()
should always respect the header's content-type as "this’s MIME type" wins. So, I wonder maybe we would need some notes (or algorithms in theblob()
) to clarify more about blob's type when it exists in the spec?Finally, if we should respect headers' Content-Type, I will fix the test to
(As this test exists in Chromium and WebKit separately, I will try to make a WPT PR and help to remove the related one in Chromium and WebKit :pray:)