|
@@ 969-976 (lines=8) @@
|
| 966 |
|
curl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); |
| 967 |
|
} |
| 968 |
|
|
| 969 |
|
if ($username && $password) { |
| 970 |
|
curl_setopt($curl, CURLOPT_USERPWD, $username . ':' . $password); |
| 971 |
|
if (defined('CURLOPT_HTTPAUTH')) { |
| 972 |
|
curl_setopt($curl, CURLOPT_HTTPAUTH, $authType); |
| 973 |
|
} elseif ($authType != 1) { |
| 974 |
|
error_log('XML-RPC: ' . __METHOD__ . ': warning. Only Basic auth is supported by the current PHP/curl install'); |
| 975 |
|
} |
| 976 |
|
} |
| 977 |
|
|
| 978 |
|
if ($method == 'https') { |
| 979 |
|
// set cert file |
|
@@ 1016-1023 (lines=8) @@
|
| 1013 |
|
$proxyPort = 8080; // NB: even for HTTPS, local connection is on port 8080 |
| 1014 |
|
} |
| 1015 |
|
curl_setopt($curl, CURLOPT_PROXY, $proxyHost . ':' . $proxyPort); |
| 1016 |
|
if ($proxyUsername) { |
| 1017 |
|
curl_setopt($curl, CURLOPT_PROXYUSERPWD, $proxyUsername . ':' . $proxyPassword); |
| 1018 |
|
if (defined('CURLOPT_PROXYAUTH')) { |
| 1019 |
|
curl_setopt($curl, CURLOPT_PROXYAUTH, $proxyAuthType); |
| 1020 |
|
} elseif ($proxyAuthType != 1) { |
| 1021 |
|
error_log('XML-RPC: ' . __METHOD__ . ': warning. Only Basic auth to proxy is supported by the current PHP/curl install'); |
| 1022 |
|
} |
| 1023 |
|
} |
| 1024 |
|
} |
| 1025 |
|
|
| 1026 |
|
// NB: should we build cookie http headers by hand rather than let CURL do it? |