[SOUP] Redirect to non HTTP destination is broken
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Apr 2015 10:13:40 +0000 (10:13 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Apr 2015 10:13:40 +0000 (10:13 +0000)
commitaacc53f18ddd4c443eee7408f858519131794d20
tree3f07f7bcafd66a6974fc799ef217f2e92ade30e2
parent45242631379b33c14393fcdfacbfad6755639cd4
[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
Source/WebCore/ChangeLog
Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestLoaderClient.cpp