|
@@ 1598-1609 (lines=12) @@
|
| 1595 |
|
curl_setopt($curl, CURLOPT_TIMEOUT, $timeout == 1 ? 1 : $timeout - 1);
|
| 1596 |
|
}
|
| 1597 |
|
|
| 1598 |
|
if($username && $password)
|
| 1599 |
|
{
|
| 1600 |
|
curl_setopt($curl, CURLOPT_USERPWD, $username.':'.$password);
|
| 1601 |
|
if (defined('CURLOPT_HTTPAUTH'))
|
| 1602 |
|
{
|
| 1603 |
|
curl_setopt($curl, CURLOPT_HTTPAUTH, $authtype);
|
| 1604 |
|
}
|
| 1605 |
|
else if ($authtype != 1)
|
| 1606 |
|
{
|
| 1607 |
|
error_log('XML-RPC: '.__METHOD__.': warning. Only Basic auth is supported by the current PHP/curl install');
|
| 1608 |
|
}
|
| 1609 |
|
}
|
| 1610 |
|
|
| 1611 |
|
if($method == 'https')
|
| 1612 |
|
{
|
|
@@ 1666-1677 (lines=12) @@
|
| 1663 |
|
}
|
| 1664 |
|
curl_setopt($curl, CURLOPT_PROXY, $proxyhost.':'.$proxyport);
|
| 1665 |
|
//curl_setopt($curl, CURLOPT_PROXYPORT,$proxyport);
|
| 1666 |
|
if($proxyusername)
|
| 1667 |
|
{
|
| 1668 |
|
curl_setopt($curl, CURLOPT_PROXYUSERPWD, $proxyusername.':'.$proxypassword);
|
| 1669 |
|
if (defined('CURLOPT_PROXYAUTH'))
|
| 1670 |
|
{
|
| 1671 |
|
curl_setopt($curl, CURLOPT_PROXYAUTH, $proxyauthtype);
|
| 1672 |
|
}
|
| 1673 |
|
else if ($proxyauthtype != 1)
|
| 1674 |
|
{
|
| 1675 |
|
error_log('XML-RPC: '.__METHOD__.': warning. Only Basic auth to proxy is supported by the current PHP/curl install');
|
| 1676 |
|
}
|
| 1677 |
|
}
|
| 1678 |
|
}
|
| 1679 |
|
|
| 1680 |
|
// NB: should we build cookie http headers by hand rather than let CURL do it?
|