How to set valid headers for a sitemap?

Here is my try,
but I still get text/html content-type:

<?php

/**
 * Class Taat_Controller_Sitemap
 * Displays sitemaps
 */
class My_Controller_Sitemap extends Zend_Controller_Action
{

    /**
     * Initialize Controller
     *
     * @return null
     */
    public function init()
    {
        $this->_helper->viewRenderer->setNoRender(true);
        parent::init();
    }

    /**
     * Display sitemap in xml format
     * @see http://sitemaps.org
     * @return null
     */
    public function xmlAction ()
    {

        //header('Content-Type: text/xml; charset=utf-8');
        $this->getResponse()->setHeader('Content-Type', 'text/xml;
charset=utf-8', true);
        $this->_helper->layout->disableLayout(true);

        echo $this->view->navigation()->sitemap();
    }
}

-- 
regards
takeshin
-- 
View this message in context: 
http://n4.nabble.com/Sitemap-headers-tp997420p997420.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to