Changeset 235418 in webkit
- Timestamp:
- Aug 27, 2018 5:43:44 PM (6 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r235414 r235418 1 2018-08-27 Basuke Suzuki <Basuke.Suzuki@sony.com> 2 3 [Curl] Enable Proxy Authentication on WebKit. 4 https://bugs.webkit.org/show_bug.cgi?id=188998 5 6 Reviewed by Alex Christensen. 7 8 Add support for proxy authentication to curl backend running on WebKit. 9 This is follow up implementation of legacy implementation: 10 - https://bugs.webkit.org/show_bug.cgi?id=185266 11 12 * NetworkProcess/curl/NetworkDataTaskCurl.cpp: 13 (WebKit::NetworkDataTaskCurl::curlDidReceiveResponse): 14 (WebKit::NetworkDataTaskCurl::tryProxyAuthentication): 15 * NetworkProcess/curl/NetworkDataTaskCurl.h: 16 * NetworkProcess/curl/NetworkProcessCurl.cpp: 17 * PlatformWin.cmake: 18 1 19 2018-08-27 Wenson Hsieh <wenson_hsieh@apple.com> 2 20 -
trunk/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp
r235326 r235418 170 170 } 171 171 172 if (m_response.isProxyAuthenticationRequired()) { 173 tryProxyAuthentication(AuthenticationChallenge(receivedResponse, 0, m_response)); 174 return; 175 } 176 172 177 didReceiveResponse(ResourceResponse(m_response), [this, protectedThis = makeRef(*this)](PolicyAction policyAction) { 173 178 if (m_state == State::Canceling || m_state == State::Completed) … … 361 366 } 362 367 368 void NetworkDataTaskCurl::tryProxyAuthentication(WebCore::AuthenticationChallenge&& challenge) 369 { 370 m_client->didReceiveChallenge(AuthenticationChallenge(challenge), [this, protectedThis = makeRef(*this), challenge](AuthenticationChallengeDisposition disposition, const Credential& credential) { 371 if (m_state == State::Canceling || m_state == State::Completed) 372 return; 373 374 if (disposition == AuthenticationChallengeDisposition::Cancel) { 375 cancel(); 376 m_client->didCompleteWithError(ResourceError::httpError(CURLE_COULDNT_RESOLVE_PROXY, m_response.url())); 377 return; 378 } 379 380 CurlContext::singleton().setProxyUserPass(credential.user(), credential.password()); 381 CurlContext::singleton().setDefaultProxyAuthMethod(); 382 383 auto requestCredential = m_curlRequest ? Credential(m_curlRequest->user(), m_curlRequest->password(), CredentialPersistenceNone) : Credential(); 384 restartWithCredential(requestCredential); 385 }); 386 } 387 363 388 void NetworkDataTaskCurl::restartWithCredential(const Credential& credential) 364 389 { -
trunk/Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.h
r235326 r235418 74 74 75 75 void tryHttpAuthentication(WebCore::AuthenticationChallenge&&); 76 void tryProxyAuthentication(WebCore::AuthenticationChallenge&&); 76 77 void restartWithCredential(const WebCore::Credential&); 77 78 -
trunk/Source/WebKit/NetworkProcess/curl/NetworkProcessCurl.cpp
r234651 r235418 34 34 #include <WebCore/FileSystem.h> 35 35 #include <WebCore/NetworkStorageSession.h> 36 #include "WebCookieManager.h" 37 #include <WebCore/CurlContext.h> 36 38 #include <WebCore/NotImplemented.h> 37 39 #include <WebCore/ResourceHandle.h> -
trunk/Source/WebKit/PlatformWin.cmake
r235098 r235418 177 177 178 178 list(APPEND WebKit_INCLUDE_DIRECTORIES 179 "${WEBCORE_DIR}/platform/network/curl" 179 180 "${WEBKIT_DIR}/NetworkProcess/curl" 180 181 "${WEBKIT_DIR}/WebProcess/WebCoreSupport/curl"
Note: See TracChangeset
for help on using the changeset viewer.