if (empty($url_parts['query'])) {
$query = $url_parts['query'] = '';
$query = $url_parts['query'];
$query .= '&' . http_build_query($data, null, '&');
$query = trim($query, '&');
if (empty($url_parts['query'])) {
$url = str_replace($url_parts['query'], $query, $url);
* Whether this transport is valid
* @return boolean True if the transport is valid, false otherwise.
public static function test($capabilities = array()) {
if (!function_exists('curl_init') || !function_exists('curl_exec')) {
// If needed, check that our installed curl version supports SSL
if (isset($capabilities['ssl']) && $capabilities['ssl']) {
$curl_version = curl_version();
if (!(CURL_VERSION_SSL & $curl_version['features'])) {