public function readHeaders($_ch, $str)
    {
        $pos = strpos($str, ':');
        if ($pos !== false) {
            $key = strtolower(substr($str, 0, $pos));
            $val = trim(substr($str, $pos + 1));
            $this->last_response_headers[$key] = $val;
        }

        return strlen($str);
    }