I'm running to the same exact error, if anyone has any more input on
this i'd appriciate it. I've been search everywhere i can think of to
find some sort of answer/reason/workaround for this.
i tried to flush the output buffer, but that isn't helping the
situation.
also, its not a matter of the content_for_layout having an extra space
in there. its odd, i can redirect the header from the layout file, but
i can't change the headers content type from there.
maybe it should go elsewhere?
i've tried not rendering a layout and change the view to an xml file,
but that didn't work either.
any ideas?
On Nov 14, 9:43 pm, "realien" <[EMAIL PROTECTED]> wrote:
> Hi guys,
>
> We've created a REST based webservice with cake, and when we set the
> layout of the controller to var $layout = 'xml'; and we have views
> for each of the actions on the controller that wil render the xml.
>
> <code>
> <?php
> /* turn off browser caching */
> header( "Expires: Mon, 20 Dec 1998 01:00:00 GMT" );
> header( "Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT" );
> header( "Cache-Control: no-cache, must-revalidate" );
> header( "Pragma: no-cache" );
> header( "Content-Type: text/xml" );
> echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
> echo $content_for_layout;
> ?>
> </code>
>
> What we are seeing is we always get 1 or 2 blank lines at the top of
> the xml rendering, which firefox complains about when the xml is served
> (IE puts up with it).
>
> We've checked our php files for lead or trailing blank lines and there
> are none. Has anyone else seen this issue?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Cake PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---