src/Common/Curl.php
protected function processHeaders($headers)
    {
        $out = array();

        $headers = explode("\r\n", trim($headers));

        foreach ($headers as $header) {
            if (strpos($header, ':') !== false) {
                $tmp = explode(':', $header);

                $out[reset($tmp)] = end($tmp);
            } else {
                if (!isset($out['http-code'])) {
                    $out['http-code'] = $header;
                }
            }
        }

        unset($headers, $header, $tmp);

        return $out;
    }
protected function processHeaders($headers)
    {
        $out = array();

        $headers = explode("\r\n", trim($headers));

        foreach ($headers as $header) {
            if (strpos($header, ':') !== false) {
                $tmp = explode(':', $header);

                $out[reset($tmp)] = end($tmp);
            } else {
                if (!isset($out['http-code'])) {
                    $out['http-code'] = $header;
                }
            }
        }

        unset($headers, $header, $tmp);

        return $out;
    }
Returns response headers as array

This can be useful to avoid extra requests for rate-limit info
x-rate-limit-limit      (max request per period)
x-rate-limit-remaining  (remaining this period)
x-rate-limit-reset      (start of next period, UTC timestamp)

@param array $headers Headers string
@return array  Headers array