Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
[Blobs] Correctly set mimetype of blob in FetchDataLoader. #10101
Just creating a new BlobDataHandle doesn't actually update the mimetype
Mar 21, 2018
Mar 21, 2018
1 check passed
@mkruisselbrink Are you sure that mimetype must include the boundary string? It seems there has been some disagreement between browsers on what to include here beyond multipart/form-data. For example, see whatwg/fetch#540. That's about charset, but its unclear to me if strictly requiring the boundary is correct here.
The test is merely verifying that the Content-Type header matches the type attribute of the blob. And that most definitely matches what the spec currently is saying (i.e. https://fetch.spec.whatwg.org/#scheme-fetch "Append
I'm not sure where the boundary string bit comes from in these tests, but wherever it comes from that seems to have already been part of the test. But yeah, there definitely are open questions/inconsistencies around Blob.type in general. I'm not sure how that should be resolved (Blob.type is on my todo list, but I haven't gotten around to it yet unfortunately), but it seems very weird to me if the decision would be that Blob.type and the Content-Type header on fetching that blob wouldn't always be the same?