[WK2] Implement platform specific Resource Response for SOUP

https://bugs.webkit.org/show_bug.cgi?id=125422

Reviewed by Martin Robinson.

SOUP specific Resource Response implementation for the Network
Process.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::continueWillSendRequest):
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160988 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 440c69a6
2013-12-23 Brian Holt <brian.holt@samsung.com>
[WK2] Implement platform specific Resource Response for SOUP
https://bugs.webkit.org/show_bug.cgi?id=125422
Reviewed by Martin Robinson.
SOUP specific Resource Response implementation for the Network
Process.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::continueWillSendRequest):
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
2013-12-22 Kwang Yul Seo <skyul@company100.net>
[WK2][SOUP] WebContext::allowSpecificHTTPSCertificateForHost does not work correctly when m_usesNetworkProcess is false
......
......@@ -243,7 +243,12 @@ void NetworkResourceLoader::willSendRequestAsync(ResourceHandle* handle, const R
void NetworkResourceLoader::continueWillSendRequest(const ResourceRequest& newRequest)
{
#if PLATFORM(MAC)
m_suggestedRequestForWillSendRequest.updateFromDelegatePreservingOldHTTPBody(newRequest.nsURLRequest(DoNotUpdateHTTPBody));
#elif USE(SOUP)
// FIXME: Implement ResourceRequest::updateFromDelegatePreservingOldHTTPBody. See https://bugs.webkit.org/show_bug.cgi?id=126127.
m_suggestedRequestForWillSendRequest.updateFromDelegatePreservingOldHTTPBody(newRequest);
#endif
RunLoop::main()->dispatch(bind(&NetworkResourceLoadScheduler::receivedRedirect, &NetworkProcess::shared().networkResourceLoadScheduler(), this, m_suggestedRequestForWillSendRequest.url()));
......
......@@ -106,7 +106,13 @@ void WebResourceLoader::didReceiveResponseWithCertificateInfo(const ResourceResp
Ref<WebResourceLoader> protect(*this);
ResourceResponse responseCopy(response);
// FIXME: This should use CertificateInfo to avoid the platform ifdefs. See https://bugs.webkit.org/show_bug.cgi?id=124724.
#if PLATFORM(MAC)
responseCopy.setCertificateChain(certificateInfo.certificateChain());
#elif USE(SOUP)
responseCopy.setSoupMessageCertificate(certificateInfo.certificate());
responseCopy.setSoupMessageTLSErrors(certificateInfo.tlsErrors());
#endif
m_coreLoader->didReceiveResponse(responseCopy);
// If m_coreLoader becomes null as a result of the didReceiveResponse callback, we can't use the send function().
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment