Hi Christophe, > > 1. How can I set the MIMI content type that is returned in the HTTP > > response? > > I think by using @expose parameter 'content_type' : > cfhttp://docs.turbogears.org/1.0/ExposeDecorator
Thanks for the reply and link to the documentation. I had tried the 'content_type' decorator parameter before without any luck. I wasn't aware of the other items that were mentioned in the documentation (as_format and accept_format), but when I tried to use them, it caused problems in the pylons framework. So, I pulled out the debugger (I'm trying to use TG2, so that's why the docs are a bit out- of-sync and explains the pylons problems). Anyway, it looks like line 161 of the WSGIController class in core.py is clobbering the headers set up by the decorators: response.headers.update(pylons.response.headers) I'm out of time for this evening, but I'll try to figure out what's going on and maybe jump over to the developers forum. > > 2. What's the best way to do this dynamically based upon the client > > type? > > May be playing with the "accept_format" parameter of expose, if it > appears that the different browser ask for different formats. > > > 3. Are there other solutions I should consider? > > Quick and dirty thought : using 2 different urls ? I like the thinking . . . maybe pushing the 2 different URL's into one URL with a WSGI filter that modifies the stream as it passes by. That would incorporate the separate flow of information, but use one outside URL without forcing addition of code in each controller. Guess I need to read up on the WSGI filters. -Eric --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

