Thursday, January 21, 2010

Forcing application/xhtml+xml on cake's responses

I use xhtml 1.1 on my pages (experimantal ones, mainly, so I just
can ;) ), so I want correct mimetype on them. I've tried:

lass AppController extends Controller {
var $components = array('RequestHandler');
function beforeFilter( ) {
$this->RequestHandler->setContent('xhtml', 'application/xhtml+xml');
}
}

but Live HTTP Headers reports the content is returned as an text/html
anyway. I kinda can't find other options. Is there something in Cake I
don't know, or is it a bug in my Apache config? (in apache, mind, I
don't use any mimetype-related options)

Best regards
Molot

No comments: