WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
225238
Can't decode empty formdata with fetch
https://bugs.webkit.org/show_bug.cgi?id=225238
Summary
Can't decode empty formdata with fetch
Jimmy Wärting
Reported
2021-04-30 11:07:00 PDT
Safari TP Version: 14.2 OS Version: OS X 10.15.7 Safari: FAIL Firefox: OK IE/Edge: FAIL What steps will reproduce the problem? 1. new Response(new FormData()).formData() What is the expected result? Get back a empty formdata... It can work if you append at least one item into the FormData. What happens instead of that? TypeError: Type error
https://github.com/web-platform-tests/wpt/issues/28607
(plz, switch to github issues instead of using bugzilla)
Attachments
Patch
(6.34 KB, patch)
2021-05-03 13:32 PDT
,
Alex Christensen
youennf
: review+
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alex Christensen
Comment 1
2021-05-03 13:32:36 PDT
Created
attachment 427594
[details]
Patch
EWS Watchlist
Comment 2
2021-05-03 13:33:27 PDT
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see
https://trac.webkit.org/wiki/WPTExportProcess
Alex Christensen
Comment 3
2021-05-03 13:35:20 PDT
@Jimmy, I added two of these lines to your test to verify it returns a FormData that is indeed empty: for (const pair of fd.entries()) { assert_true(false); } You may consider this in your upstream PR. Also, I removed an extra one space indent that crept into all but one line of your test.
youenn fablet
Comment 4
2021-05-03 23:07:19 PDT
Comment on
attachment 427594
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=427594&action=review
> LayoutTests/imported/w3c/web-platform-tests/fetch/api/body/formdata.any.js:5 > + for (const pair of fd.entries()) { assert_true(false); }
assert_unreached would be clearer.
> LayoutTests/imported/w3c/web-platform-tests/fetch/api/body/formdata.any.js:15 > + for (const pair of fd.entries()) { assert_true(false); }
Ditto here.
Radar WebKit Bug Importer
Comment 5
2021-05-07 11:07:37 PDT
<
rdar://problem/77663677
>
Ahmad Saleem
Comment 6
2022-08-01 12:57:17 PDT
I think this didn't landed yet despite r+ because Safari still fail these tests (matched from within patch to WPT):
https://wpt.fyi/results/fetch/api/body?label=master&label=experimental&aligned&view=subtest&q=formdata
Please ignore my comment, if I am wrong. Thanks!
Alex Christensen
Comment 7
2022-08-02 11:47:32 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/2956
EWS
Comment 8
2022-08-02 12:51:43 PDT
Committed
253047@main
(0cd625839811): <
https://commits.webkit.org/253047@main
> Reviewed commits have been landed. Closing PR #2956 and removing active labels.
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