Thursday, November 12, 2009

Re: Debug >= 2 changes the response context type

Scott,

Thanks, however keep in mind I've already implemented FirePHP (a
plugin for the FF Firebug extension). It means, table is not being
dumped to the page, but to the Firebug console. It works pretty well,
but I'm not sure why (where) the content type is set to HTML.

On Nov 11, 6:48 pm, Scott Dahl <scottmd...@gmail.com> wrote:
> CakePHP dumps out a table of data when debug level is set to 2...this
> obviously won't be valid JSON.  Not sure why the headers would change
> though.
>
> On Wed, Nov 11, 2009 at 1:38 PM, Alberto Dominguez <alberto.doming...@egresados.uniandes.edu.co> wrote:
> > Hi,
>
> > I'm using CakePHP to generate JSON responses. I'm also using FirePHP
> > to debug and log the application execution. It works pretty well,
> > however when I set the DEBUG level to 2 o higher -i.e. when I need to
> > monitor the DB query executions- it suddenly changes the response
> > header content type to HTML (Content-Type: text/html).
>
> > I'm looking at several files, but I cannot find where it is being
> > changed.
>
> > Implementation Notes
>
> > 1. My JSON implementation is really close to match the one presented
> > at  http://www.pagebakers.nl/2007/06/05/using-json-in-cakephp-12/
> > 2. CakePHP is successfully debugging and logging to FirePHP -even when
> > I change the debug level from 1 to 2.
> > 3. FireBug is the tool I use to monitor the HTTP communication
> > 4. I'm setting the JSON content type at "RequestHandlerComponent"
> > 5. I'm using JSONView extension at Firefox to validate the output
> > (obviously it doesn't work when content type is set to text/html
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com.
> > To unsubscribe from this group, send email to
> > cake-php+unsubscribe@googlegroups.com<cake-php%2Bunsubscribe@googlegroups.c om>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=.

--

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cake-php?hl=.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate