protected function getCookies() 
    {
        $headers = '';
        foreach ($this->cookies as $key => $val) {
            if ($headers) $headers .= '; ';
            $headers .= $key. '='. $val;
        }

        if ($headers) {
            $headers = "Cookie: $headers"."\r\n";
        }

        return $headers;
    }