## 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
Pull request: https://github.com/WebKit/WebKit/pull/18689
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…)
Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/42455
Committed 269144@main (d0c370d532ad): <https://commits.webkit.org/269144@main> Reviewed commits have been landed. Closing PR #18689 and removing active labels.
<rdar://problem/116742000>