WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
228085
FetchResponse.formData() should not reject promise if the body is null and the MIME Type is "application/x-www-form-urlencoded"
https://bugs.webkit.org/show_bug.cgi?id=228085
Summary
FetchResponse.formData() should not reject promise if the body is null and th...
Chris Dumez
Reported
2021-07-19 12:49:56 PDT
FetchResponse.formData() should not reject promise if the body is null and the MIME Type is "application/x-www-form-urlencoded": -
https://fetch.spec.whatwg.org/#concept-body-consume-body
-
https://fetch.spec.whatwg.org/#concept-body-package-data
As per the specification, we should package an empty byte sequence in this case and resolve the promise with that.
Attachments
Patch
(10.86 KB, patch)
2021-07-19 12:52 PDT
,
Chris Dumez
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(10.86 KB, patch)
2021-07-19 12:56 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(10.92 KB, patch)
2021-07-19 13:06 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2021-07-19 12:52:04 PDT
Created
attachment 433813
[details]
Patch
Chris Dumez
Comment 2
2021-07-19 12:56:32 PDT
Created
attachment 433814
[details]
Patch
Alex Christensen
Comment 3
2021-07-19 13:02:43 PDT
Comment on
attachment 433814
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=433814&action=review
> Source/WebCore/Modules/fetch/FetchBodyOwner.cpp:195 > + if (isBodyNullOrOpaque()) { > + // If the content-type is 'application/x-www-form-urlencoded', a body is not required and we should package an empty byte sequence as per the specification.
It seems like we should only do this for isBodyNull
Chris Dumez
Comment 4
2021-07-19 13:06:07 PDT
Created
attachment 433815
[details]
Patch
Chris Dumez
Comment 5
2021-07-19 13:06:33 PDT
(In reply to Alex Christensen from
comment #3
)
> Comment on
attachment 433814
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=433814&action=review
> > > Source/WebCore/Modules/fetch/FetchBodyOwner.cpp:195 > > + if (isBodyNullOrOpaque()) { > > + // If the content-type is 'application/x-www-form-urlencoded', a body is not required and we should package an empty byte sequence as per the specification. > > It seems like we should only do this for isBodyNull
Good point, the spec only mentions the body being null.
Chris Dumez
Comment 6
2021-07-19 13:21:18 PDT
Why the r-??
Alex Christensen
Comment 7
2021-07-19 13:21:55 PDT
isBodyNullOrOpaque needs to be changed to isBodyNull
Chris Dumez
Comment 8
2021-07-19 13:22:37 PDT
Comment on
attachment 433815
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=433815&action=review
> Source/WebCore/Modules/fetch/FetchBodyOwner.cpp:195 > + if (isBodyNull()) {
It does check isBodyNull()... ?
Alex Christensen
Comment 9
2021-07-19 13:23:38 PDT
Comment on
attachment 433815
[details]
Patch Oh, I didn't see that there was a new patch. Sorry
EWS
Comment 10
2021-07-19 14:33:24 PDT
Committed
r280046
(
239781@main
): <
https://commits.webkit.org/239781@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 433815
[details]
.
Radar WebKit Bug Importer
Comment 11
2021-07-19 14:34:24 PDT
<
rdar://problem/80802980
>
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