protected function parseRawResponse($data, $info)
    {
        $result = [];

        $headerSize = $info['header_size'];
        $result['data'] = substr($data, $headerSize);

        $rawHeaders = explode("\r\n", substr($data, 0, $headerSize));
        // First line is status-code HTTP/1.1 200 OK
        list(, $result['statusCode'], $result['reasonPhrase']) = explode(' ', array_shift($rawHeaders), 3);
        foreach ($rawHeaders as $line) {
            if ($line === '') {
                continue;
            }

            list($key, $value) = explode(': ', $line);
            $result['headers'][strtolower($key)][] = $value;
        }

        return $result;
    }