[Curl] Basic authentication is not reused.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Nov 2013 18:45:15 +0000 (18:45 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Nov 2013 18:45:15 +0000 (18:45 +0000)
commita89e4ff55ad6d8daf0e5f03d3722c2f31b2a9cf5
tree41f717a32a9b309509ce99827f64416e2a98e5e4
parent9a8a4568eea2cae18085e192654d4e511c97ee94
[Curl] Basic authentication is not reused.
https://bugs.webkit.org/show_bug.cgi?id=124452

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-11-18
Reviewed by Brent Fulgham.

After a successful basic authentication, the credentials are not reused for later requests.
In the CFNetwork port, this is solved by trying basic authentication first, if credentials exists.
Also, when a 401 response is received, the first thing the CFNetwork port does, is to use
m_user/m_pass as credentials in the following request if they are set.
This can be done the same way for the Curl version.

* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Try using m_user/m_pass as credentials first, if they are set.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::applyAuthenticationToRequest): Try basic authentication first, if credentials exists.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@159435 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/network/curl/ResourceHandleCurl.cpp
Source/WebCore/platform/network/curl/ResourceHandleManager.cpp