Just thought I'd post an update. I went with the function mentioned above
with minor changes and it's been in production for a few weeks now. If a
specific application was already returning with headers (JSON, generated
file download, etc...) I just passed the response along.
def headersProcessor(h): res = h() if res: if not
web.ctx.headers: web.header('Content-type', 'text/html;
charset=utf-8') web.header('Content-Length', len(res)) return
res
--
You received this message because you are subscribed to the Google Groups
"web.py" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/webpy/-/Pn-OCl0gr1IJ.
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/webpy?hl=en.