Bug 227477

Summary: xhr.send(URLSearchParams) should align default Content-Type header field with Chrome and Firefox
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, cdumez, esprehn+autocc, ews-watchlist, kondapallykalyan, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch ews-feeder: commit-queue-

Description Alex Christensen 2021-06-28 22:44:23 PDT
xhr.send(URLSearchParams) should align default Content-Type header field with Chrome and Firefox
Comment 1 Alex Christensen 2021-06-28 22:45:39 PDT
Created attachment 432453 [details]
Patch
Comment 2 Alex Christensen 2021-06-29 10:01:27 PDT
Created attachment 432492 [details]
Patch
Comment 3 Chris Dumez 2021-06-29 10:03:11 PDT
Comment on attachment 432492 [details]
Patch

r=me
Comment 4 EWS 2021-06-29 12:07:50 PDT
Committed r279380 (239245@main): <https://commits.webkit.org/239245@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 432492 [details].
Comment 5 Radar WebKit Bug Importer 2021-06-29 12:08:31 PDT
<rdar://problem/79927791>
Comment 6 Alexey Proskuryakov 2021-06-29 14:53:37 PDT
Comment on attachment 432492 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=432492&action=review

> LayoutTests/imported/w3c/web-platform-tests/xhr/setrequestheader-content-type-expected.txt:-34
> -PASS ReadableStream request respects setRequestHeader("")
> -FAIL ReadableStream request with under type sends no Content-Type without setRequestHeader() call assert_equals: expected "" but got "Content-Type: text/plain;charset=UTF-8\n"
> -FAIL ReadableStream request keeps setRequestHeader() Content-Type and charset assert_equals: expected "Content-Type: application/xml;charset=ASCII\n" but got "Content-Type: application/xml;charset=UTF-8\n"

I'm curious about how these lines disappeared.
Comment 7 Alex Christensen 2021-06-29 14:55:08 PDT
The test had been marked as failing, then updated, and nobody noticed those tests were removed.