Support non-BASIC Authentication schemes in the HTTP API if server supports them. Props ssandison, See #4011, Fixes #12200
git-svn-id: http://svn.automattic.com/wordpress/trunk@13484 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
549cebcf5c
commit
4e8de447f6
|
@ -1209,7 +1209,7 @@ class WP_Http_ExtHTTP {
|
||||||
|
|
||||||
if ( $proxy->use_authentication() ) {
|
if ( $proxy->use_authentication() ) {
|
||||||
$options['proxyauth'] = $proxy->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 ( $proxy->use_authentication() ) {
|
||||||
if ( $isPHP5 )
|
if ( $isPHP5 )
|
||||||
curl_setopt( $handle, CURLOPT_PROXYAUTH, CURLAUTH_BASIC );
|
curl_setopt( $handle, CURLOPT_PROXYAUTH, CURLAUTH_ANY );
|
||||||
|
|
||||||
curl_setopt( $handle, CURLOPT_PROXYUSERPWD, $proxy->authentication() );
|
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
|
* enable proxy support. There are also a few filters that plugins can hook into for some of the
|
||||||
* constants.
|
* 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:
|
* The constants are as follows:
|
||||||
* <ol>
|
* <ol>
|
||||||
* <li>WP_PROXY_HOST - Enable proxy support and host for connecting.</li>
|
* <li>WP_PROXY_HOST - Enable proxy support and host for connecting.</li>
|
||||||
|
|
Loading…
Reference in New Issue