protected function _headersToString($headers, $eol = "\r\n")
    {
        $out = '';
        foreach ($headers as $key => $value) {
            if ($value === false || $value === null || $value === '') {
                continue;
            }
            $out .= $key . ': ' . $value . $eol;
        }
        if (!empty($out)) {
            $out = substr($out, 0, -1 * strlen($eol));
        }

        return $out;
    }