XMLHTTPRequest POSTs to a custom WKURLSchemeHandler protocol are missing the HTTP...
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Apr 2019 22:03:04 +0000 (22:03 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Apr 2019 22:03:04 +0000 (22:03 +0000)
commit443589b5c7b38129b6080102505f5cb84eb9b5de
tree919414465d6e6a19f76447cc2ab7c21ea03bd9ea
parentb48709abc551deeb476f249972542f3949ee11cd
XMLHTTPRequest POSTs to a custom WKURLSchemeHandler protocol are missing the HTTP body.
https://bugs.webkit.org/show_bug.cgi?id=191362

Reviewed by Alex Christensen.

Source/WebCore:

Covered by new API tests.

In 2008 some refactoring added an HTTP(S)-only restriction to copying the form body for
XHRs that POST, and it added that restriction with no explanation.

We definitely want to allow that.

Blobs are broken at this time (covered by bug 197237)

* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::send):
(WebCore::XMLHttpRequest::sendBytesData):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm: Add a test that POSTs all sorts of things
  from an XHR to a custom protocol.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244617 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/xml/XMLHttpRequest.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm