thirdparty/Zend/Http/Response.php
public function getHeadersAsString($status_line = true, $br = "\n")
    {
        $str = '';

        if ($status_line) {
            $str = "HTTP/{$this->version} {$this->code} {$this->message}{$br}";
        }

        // Iterate over the headers and stringify them
        foreach ($this->headers as $name => $value)
        {
            if (is_string($value))
                $str .= "{$name}: {$value}{$br}";

            elseif (is_array($value)) {
                foreach ($value as $subval) {
                    $str .= "{$name}: {$subval}{$br}";
                }
            }
        }

        return $str;
    }
public function getHeadersAsString($status_line = true, $br = "\n")
    {
        $str = '';

        if ($status_line) {
            $str = "HTTP/{$this->version} {$this->code} {$this->message}{$br}";
        }

        // Iterate over the headers and stringify them
        foreach ($this->headers as $name => $value)
        {
            if (is_string($value))
                $str .= "{$name}: {$value}{$br}";

            elseif (is_array($value)) {
                foreach ($value as $subval) {
                    $str .= "{$name}: {$subval}{$br}";
                }
            }
        }

        return $str;
    }
public function getHeadersAsString ( $ status_line = true , $ br = "\n" ) { $ str = '' ; if ( $ status_line ) { $ str = "HTTP/{$this->version} {$this->code} {$this->message}{$br}" ; } // Iterate over the headers and stringify them foreach ( $ this -> headers as $ name => $ value ) { if ( is_string ( $ value ) ) $ str .= "{$name}: {$value}{$br}" ; elseif ( is_array ( $ value ) ) { foreach ( $ value as $ subval ) { $ str .= "{$name}: {$subval}{$br}" ; } } } return $ str ; }
Get all headers as string

@param boolean $status_line Whether to return the first status line (IE "HTTP 200 OK")
@param string $br Line breaks (eg. "\n", "\r\n", "<br />")
@return string
Get all headers as string