Here it is
$response = $this->getResponse();
$response->setHeader('Cache-Control', 'public', true)
->setHeader('Content-Description', 'File Transfer', true)
->setHeader('Content-Type', 'application/xml', true)
->setHeader('Content-Transfer-Encoding', 'binary', true)
->appendBody($xmlString);
Sergio
> Date: Sat, 2 Jan 2010 12:56:54 -0800
> From: [email protected]
> To: [email protected]
> Subject: [fw-general] Sitemap headers
>
>
> 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.
_________________________________________________________________
25 Gigabyte per le tue foto online
http://www.windowslive.it/foto.aspx