Page 1 of 1

How to override the http content-type header in cmsms 1.10?

Posted: Tue Nov 01, 2011 11:07 am
by deactivated010521
----------

Re: How to override the http content-type header in cmsms 1.

Posted: Thu Apr 19, 2012 8:43 pm
by zaidcrowe
hey - did you have any luck with a solution for this?

Re: How to override the http content-type header in cmsms 1.

Posted: Thu Apr 19, 2012 9:14 pm
by zaidcrowe
for anyone interested - the only thing i found that could help me right now (as of 1.10.3) is something I borrowed for the CMSPrinting module:

// kill any output that may have happened already.
$handlers = ob_list_handlers();
for ($cnt = 0; $cnt < sizeof($handlers); $cnt++) { ob_end_clean(); }
header("Content-Type: application/json");

----
Some pretty creative code - filthy, but creative :O)