WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
262635
FetchResponse.formData() should parse headers names as case insensitive
https://bugs.webkit.org/show_bug.cgi?id=262635
Summary
FetchResponse.formData() should parse headers names as case insensitive
Jimmy Wärting
Reported
2023-10-04 11:21:49 PDT
## reproducible code: async function init() { var fd = new FormData() fd.set('x', 'y') var blob = await new Response(fd).blob() var body = await blob.text() blob = new Blob([body.toLowerCase()], { // convert boundary to lowercase also. type: blob.type.toLowerCase() }) fd = await new Response(blob).formData() console.log([...fd]) } init() ## Test page:
https://jsfiddle.net/x0o1mqj8/
Works in Firefox, and all chromium browsers fails in safari
Attachments
Add attachment
proposed patch, testcase, etc.
sideshowbarker
Comment 1
2023-10-05 05:36:06 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/18689
sideshowbarker
Comment 2
2023-10-05 05:42:21 PDT
If we do actually want to have interop on this, I can add WPT tests to the PR — and also I guess, update the algorithm at
https://fetch.spec.whatwg.org/#dom-body-formdata
to explicitly that the Content-Disposition and Content-Type headers names must be parsed case-insensitively. (Though, as noted in the comment which follows that algorithm in the spec: The algorithm is just “a rough approximation of what is needed for multipart/form-data” — that is, it’s already recognized to be underspecified…)
sideshowbarker
Comment 3
2023-10-10 08:43:20 PDT
Submitted web-platform-tests pull request:
https://github.com/web-platform-tests/wpt/pull/42455
EWS
Comment 4
2023-10-10 09:12:31 PDT
Committed
269144@main
(d0c370d532ad): <
https://commits.webkit.org/269144@main
> Reviewed commits have been landed. Closing PR #18689 and removing active labels.
Radar WebKit Bug Importer
Comment 5
2023-10-10 09:13:17 PDT
<
rdar://problem/116742000
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug