[SOUP] Redirect to non HTTP destination is broken
https://bugs.webkit.org/show_bug.cgi?id=143866
Reviewed by Sergio Villar Senin.
Source/WebCore:
This is because we are passing true unconditionally as
isHTTPFamilyRequest parameter of
createSoupRequestAndMessageForHandle in continueAfterWillSendRequest.
We don't actually need to pass isHTTPFamilyRequest parameter to
createSoupRequestAndMessageForHandle, since it can simply check
that from the given request.
Covered by unit tets and also cache/disk-cache/disk-cache-redirect-to-data.html.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::continueAfterWillSendRequest):
(WebCore::createSoupRequestAndMessageForHandle):
(WebCore::ResourceHandle::start):
Tools:
Add a unit test to check that redirect to a data URI works.
* TestWebKitAPI/Tests/WebKit2Gtk/TestLoaderClient.cpp:
(testRedirectToDataURI):
(serverCallback):
(beforeAll):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182943
268f45cc-cd09-0410-ab3c-
d52691b4dbfc