/** * {@inheritdoc} * * This method is overridden to deal with a cURL quirk: the usage of * CURLOPT_CUSTOMREQUEST cannot be unset on the cURL handle, so we need to * override it every time it is omitted. */ protected function curlExec($curl_options, $redirect = FALSE) { if (!isset($curl_options[CURLOPT_CUSTOMREQUEST])) { if (!empty($curl_options[CURLOPT_HTTPGET])) { $curl_options[CURLOPT_CUSTOMREQUEST] = 'GET'; } if (!empty($curl_options[CURLOPT_POST])) { $curl_options[CURLOPT_CUSTOMREQUEST] = 'POST'; } } return parent::curlExec($curl_options, $redirect); }