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.
Created attachment 433813 [details] Patch
Created attachment 433814 [details] Patch
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
Created attachment 433815 [details] Patch
(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.
Why the r-??
isBodyNullOrOpaque needs to be changed to isBodyNull
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()... ?
Comment on attachment 433815 [details] Patch Oh, I didn't see that there was a new patch. Sorry
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].
<rdar://problem/80802980>