[whatwg/fetch] Preflight for Content-Type request header (#1269)

If I understand correctly, according to the spec `Content-Type: text/plain;charset=utf8,text/html` is [cors-safelisted](https://fetch.spec.whatwg.org/#cors-safelisted-request-header) while `Content-Type: text/plain,text/html` is not.

This happens because [parsing](https://mimesniff.spec.whatwg.org/#parse-a-mime-type) `Content-Type: text/plain;charset=utf-8,text/html` returns as mimetype `text/plain` and as parameter `(charset, utf8,text/html)` while [parsing](https://mimesniff.spec.whatwg.org/#parse-a-mime-type) `Content-Type: text/plain,text/html` returns as mimetype 
 type `text` with subtype `plain,text/html`.

I believe both headers above should issue preflight requests (in fact, they do in Firefox).

-- 
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/1269

Received on Tuesday, 20 July 2021 07:30:39 UTC