If you believe the behavior is not as you would expect, write a test case & submit a bug report to http://trac.cakephp.org
If you don't know what a unit test is, please take a look at http://mark-story.com/files/unit_testing.pdf . It's a big PDF, but explains the concept quite well. Thanks! -J. On Jun 19, 1:23 am, lapinski <lapinski....@gmail.com> wrote: > I can confirm that Miles J was correct. > > I just added this to my controller: > > $this->RequestHandler->respondAs("text/xml") > > but on the client side, responseXML is null (in prototype.js Ajax onSuccess > callback). > > But if I added this to my controller as Miles J suggested: > > $this->header('Content-Type: text/xml'); > > I got an XML object in my responseXML. > > Are we missing something? Or the requesthandler is not working as wished? > > Lapinski > > > > > > jperras wrote: > > > Use the RequestHandlerComponent::respondAs method. This should set the > > appropriate content-type headers based on the $type that you give it. > > >http://api.cakephp.org/class/request-handler-component#method-Request... > > > -j. > > > On Jun 15, 4:15 pm, Miles J <mileswjohn...@gmail.com> wrote: > >> But it doesn't work. Even if you use the Request Handler to output as > >> XML, it is not XML. > > >> On Jun 15, 7:50 am, jperras <joel.per...@gmail.com> wrote: > > >> > You should be using the RequestHandler Component for content-type > >> > setting/detection of your views and actions. > > >> >http://api.cakephp.org/class/request-handler-component > > >> > -j. > > >> > On Jun 14, 5:56 pm, Peter <peterdun...@gmail.com> wrote: > > >> > > thanks, that's what i needed....although i moved it to the top of the > >> > > default xml-layoutfile i use. > > >> > > On 14 jun, 23:44, Miles J <mileswjohn...@gmail.com> wrote: > > >> > > > I usually put this at the end of my controller actions: > > >> > > > $this->header('Content-Type: text/xml'); > > >> > > > On Jun 14, 10:26 am, Peter <peterdun...@gmail.com> wrote: > > >> > > > > how can i change the content-type of a view? i have an xml-view > >> which > >> > > > > renders just fine, but my browser sees it as text/html. > > -- > View this message in > context:http://www.nabble.com/Change-the-content-type-tp24024660p24105688.html > Sent from the CakePHP mailing list archive at Nabble.com. --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---