[Curl] Suppress extra didReceiveAuthenticationChallenge call when accessing a server...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 12 May 2019 23:05:20 +0000 (23:05 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 12 May 2019 23:05:20 +0000 (23:05 +0000)
commita1f2a7a1f754279c618e83adf2bb2ce640f78c2c
tree23f97567aadc0103f3d9297ab9d44c6cc7bf8fac
parent784c2297e0d77a4f3476d8dccc1b72ee3e293118
[Curl] Suppress extra didReceiveAuthenticationChallenge call when accessing a server which checks basic auth.
https://bugs.webkit.org/show_bug.cgi?id=197650

Patch by Takashi Komori <Takashi.Komori@sony.com> on 2019-05-12
Reviewed by Fujii Hironori.

Source/WebCore:

When Curl port accesses a page which checks Basic Authentication credential and server trust challenge occurs,
Curl port calls extra didReceiveAuthenticationChallenge unnecessarily.
This is because Curl port discards information about allowed server trust challenge before in NetworkDataTaskCurl::restartWithCredential.

Test: http/tests/ssl/curl/certificate-and-authentication.html

* platform/network/curl/CurlRequest.h:
(WebCore::CurlRequest::isServerTrustEvaluationDisabled):

Source/WebKit:

* NetworkProcess/curl/NetworkDataTaskCurl.cpp:
(WebKit::NetworkDataTaskCurl::restartWithCredential):

LayoutTests:

* TestExpectations:
* http/tests/resources/basic-auth.php: Added.
* http/tests/ssl/curl/certificate-and-authentication-expected.txt: Added.
* http/tests/ssl/curl/certificate-and-authentication.html: Added.
* platform/wincairo-wk1/TestExpectations:
* platform/wincairo/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/http/tests/resources/basic-auth.php [new file with mode: 0644]
LayoutTests/http/tests/ssl/curl/certificate-and-authentication-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/ssl/curl/certificate-and-authentication.html [new file with mode: 0644]
LayoutTests/platform/wincairo-wk1/TestExpectations
LayoutTests/platform/wincairo/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/platform/network/curl/CurlRequest.h
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp