2008/10/15 Christoph Zwerschke <[EMAIL PROTECTED]>: > > Christophe de VIENNE schrieb: >> We have just upgraded our applicatoin from TG 1.0.4.4 to TG 1.0.7, and >> noticed that the Content-Type header is now completed with the charset >> for any content type except json. (the code is in view/base.py around >> line 150). >> >> Although it seems to be a very good thing for content types like html >> or text, does it make sense for a PDF or binary files ? >> >> In our case we generate PDF file on the fly, and we had to change the >> client code to handle this charset presence in the Content-Type. Now >> that it is done it is not a problem any more, but it still seems weird >> to me. > > How do you generate the PDF? This should happen only for content > produced with a templating engine, and these usually create html/text.
Indeed, I wrote a decated templating engine that can generate, from a particular data structure, several kind of output. This made it possible to make the rendering engine choice handled by expose depending on the accept header (or tg_format). By the way, why is this charset not set for json ? Christophe --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
