Raw requests and responses.

4 views
Skip to first unread message

Zarrabeitia

unread,
Dec 13, 2005, 8:48:05 PM12/13/05
to TurboGears

I'm very new with turbogears, and I'm trying to port a few CGIs.
So far, i haven't hit any mayor problem, however, I need now some of my
exported methods to have a *very primitive* behavior: I need to return
the raw http response, and if possible, parse the raw http request.

That means, no template processing, nothing. I need to send a binary
file generated dinamically. How can I do that?

Regards,
Luis.

Lee McFadden

unread,
Dec 14, 2005, 4:18:20 AM12/14/05
to turbo...@googlegroups.com
If you use @turbogears.expose() with no arguments you can output raw
strings by returning them.

If you want to return a binary file, take a look at the cherrypy wiki[1].

Lee

[1] http://www.cherrypy.org/wiki/FileDownload

zarra...@gmail.com

unread,
Dec 14, 2005, 8:21:22 AM12/14/05
to turbo...@googlegroups.com
Thanks. I'll take a look at it tonight.
I tried the expose() before posting, and the output looked a lot like
json... I guess I was falling asleep already...

zarra...@gmail.com

unread,
Dec 14, 2005, 8:22:14 AM12/14/05
to turbo...@googlegroups.com
Oh, I almost forgot... how do I get rid of the "build time: page size:" message?

Lee McFadden

unread,
Dec 14, 2005, 8:30:27 AM12/14/05
to turbo...@googlegroups.com
logDebugInfoFilter.on = False

The above line needs to be in your dev.cfg.

Lee

Reply all
Reply to author
Forward
0 new messages