Support non-BASIC Authentication schemes in the HTTP API if server supports them. Props ssandison, See #4011, Fixes #12200
git-svn-id: https://develop.svn.wordpress.org/trunk@13484 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0b63979093
commit
c74a4432b4
@ -1209,7 +1209,7 @@ class WP_Http_ExtHTTP {
|
||||
|
||||
if ( $proxy->use_authentication() ) {
|
||||
$options['proxyauth'] = $proxy->authentication();
|
||||
$options['proxyauthtype'] = HTTP_AUTH_BASIC;
|
||||
$options['proxyauthtype'] = HTTP_AUTH_ANY;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1320,7 +1320,7 @@ class WP_Http_Curl {
|
||||
|
||||
if ( $proxy->use_authentication() ) {
|
||||
if ( $isPHP5 )
|
||||
curl_setopt( $handle, CURLOPT_PROXYAUTH, CURLAUTH_BASIC );
|
||||
curl_setopt( $handle, CURLOPT_PROXYAUTH, CURLAUTH_ANY );
|
||||
|
||||
curl_setopt( $handle, CURLOPT_PROXYUSERPWD, $proxy->authentication() );
|
||||
}
|
||||
@ -1464,6 +1464,9 @@ class WP_Http_Curl {
|
||||
* enable proxy support. There are also a few filters that plugins can hook into for some of the
|
||||
* constants.
|
||||
*
|
||||
* Please note that only BASIC authentication is supportted by most transports.
|
||||
* cURL and the PHP HTTP Extension MAY support more methods(such as NTLM Authentication) depending on your environment.
|
||||
*
|
||||
* The constants are as follows:
|
||||
* <ol>
|
||||
* <li>WP_PROXY_HOST - Enable proxy support and host for connecting.</li>
|
||||
|
Loading…
Reference in New Issue
Block a user