cool, so after some minor digging into the tg2 code, i realized that @expose takes a content_type argument. Thus, my code becomes:
> @expose(content_type="application/csv") > def export(self, **kw): > r = 'asdf,asdf,asdf' > response = pylons.response > response.headers['Content-Transfer-Encoding'] = 'Binary' > response.headers['Content-length'] = len(r) > response.headers['Content-Disposition'] = 'attachment; > filename=\"mygenerated.csv\"' > response.headers['Connection'] = "close" > return r > I wonder if it might be a good idea to look at the response headers inside _render_response to see if the content-type has not already been set??? cheers. -chris --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears Trunk" 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-trunk?hl=en -~----------~----~----~----~------~----~------~--~---
