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