protected function toHeader(array $params)
    {
        $out    = '';
        $last   = end($params);

        foreach ($params as $k => $v) {
            $out .= $k.'="'.$v.'"';

            if ($v != $last) {
                $out .= ',';
            }
        }

        return $out;
    }