Summary: | FetchResponse.formData() should not reject promise if the body is null and the MIME Type is "application/x-www-form-urlencoded" | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||||||
Component: | Page Loading | Assignee: | Chris Dumez <cdumez> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | achristensen, beidson, darin, sam, webkit-bug-importer, youennf | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Chris Dumez
2021-07-19 12:49:56 PDT
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]. |