|
@@ 882-889 (lines=8) @@
|
| 879 |
|
curl_setopt($curl, CURLOPT_TIMEOUT, $timeout == 1 ? 1 : $timeout - 1); |
| 880 |
|
} |
| 881 |
|
|
| 882 |
|
if ($username && $password) { |
| 883 |
|
curl_setopt($curl, CURLOPT_USERPWD, $username . ':' . $password); |
| 884 |
|
if (defined('CURLOPT_HTTPAUTH')) { |
| 885 |
|
curl_setopt($curl, CURLOPT_HTTPAUTH, $authType); |
| 886 |
|
} elseif ($authType != 1) { |
| 887 |
|
error_log('XML-RPC: ' . __METHOD__ . ': warning. Only Basic auth is supported by the current PHP/curl install'); |
| 888 |
|
} |
| 889 |
|
} |
| 890 |
|
|
| 891 |
|
if ($method == 'https') { |
| 892 |
|
// set cert file |
|
@@ 929-936 (lines=8) @@
|
| 926 |
|
$proxyPort = 8080; // NB: even for HTTPS, local connection is on port 8080 |
| 927 |
|
} |
| 928 |
|
curl_setopt($curl, CURLOPT_PROXY, $proxyHost . ':' . $proxyPort); |
| 929 |
|
if ($proxyUsername) { |
| 930 |
|
curl_setopt($curl, CURLOPT_PROXYUSERPWD, $proxyUsername . ':' . $proxyPassword); |
| 931 |
|
if (defined('CURLOPT_PROXYAUTH')) { |
| 932 |
|
curl_setopt($curl, CURLOPT_PROXYAUTH, $proxyAuthType); |
| 933 |
|
} elseif ($proxyAuthType != 1) { |
| 934 |
|
error_log('XML-RPC: ' . __METHOD__ . ': warning. Only Basic auth to proxy is supported by the current PHP/curl install'); |
| 935 |
|
} |
| 936 |
|
} |
| 937 |
|
} |
| 938 |
|
|
| 939 |
|
// NB: should we build cookie http headers by hand rather than let CURL do it? |