From c74a4432b4f72719815422e7fc3505806ff3efbf Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Sun, 28 Feb 2010 04:24:04 +0000 Subject: [PATCH] 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 --- wp-includes/class-http.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wp-includes/class-http.php b/wp-includes/class-http.php index fb3d9747cf..64c0fca9cf 100644 --- a/wp-includes/class-http.php +++ b/wp-includes/class-http.php @@ -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: *
    *
  1. WP_PROXY_HOST - Enable proxy support and host for connecting.