- From: Ben Kelly <notifications@github.com>
- Date: Tue, 09 May 2017 11:45:16 -0700
- To: whatwg/fetch <fetch@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/fetch/issues/540@github.com>
Writing this issue based on this gecko bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1362824 To summarize, if you visit this test in different browsers you will get different blob types: https://bl.ocks.org/jhabdas/87f8bc3573cf91b4c35e0c799addd762 You get: * Chrome: `text/css` * Safari: `text/css` * Yandex: `text/css` * Firefox: `text/css; charset=utf-8` * Edge: `text/css; charset=utf-8` Alternatively, if you run this code in the console in various browsers you get a different set of types: ``` new Response(new URLSearchParams('name=value')).blob().then(b => console.log(b.type)) ``` You get: * chrome: application/x-www-form-urlencoded;charset=utf-8 * safari: application/x-www-form-urlencoded * firefox: application/x-www-form-urlencoded;charset=utf-8 * edge: does not support URLSearchParams As you can see, browsers are inconsistent in whether to include the charset param in the `Blob.type` content-type value. Firefox always includes it. Safari never includes it. Chrome sometimes includes it. What do people think these different cases should do? Sorry if this should go on a different spec, but behavior seems somewhat dependent on source, so thought fetch might be a reasonable place to start. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/fetch/issues/540
Received on Tuesday, 9 May 2017 18:45:51 UTC