XMLHttpRequest Send: fix Content-Type failures (#38993)

Replaced usage of `typed_insert` since it ended converting `UTF-8` to
lowercase.
Removed one of the test cases since it wasn't following spec since
[xhr/205](https://github.com/whatwg/xhr/pull/205).

Testing: Changes covered by wpt
Fixes: #20436

---------

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
This commit is contained in:
Gae24 2025-08-28 14:44:42 +02:00 committed by GitHub
parent cb64def7e6
commit 908c392219
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 7 additions and 32 deletions

View file

@ -2,17 +2,11 @@
[charset given but wrong, fix it (unknown MIME, bogus charset)]
expected: FAIL
[charset given but wrong, fix it (known MIME, actual charset)]
expected: FAIL
[Multiple non-UTF-8 charset parameters deduplicate, bogus parameter dropped]
expected: FAIL
[charset with leading space that is UTF-8 does change]
expected: FAIL
[charset in double quotes with space]
expected: FAIL
[unknown parameters need to be preserved]
expected: FAIL

View file

@ -1,12 +0,0 @@
[setrequestheader-content-type.htm]
[String request keeps setRequestHeader() Content-Type, with charset adjusted to UTF-8]
expected: FAIL
[XML Document request keeps setRequestHeader() Content-Type, with charset adjusted to UTF-8]
expected: FAIL
[HTML Document request keeps setRequestHeader() Content-Type, with charset adjusted to UTF-8]
expected: FAIL
[URLSearchParams request keeps setRequestHeader() Content-Type, with charset adjusted to UTF-8]
expected: FAIL