I want to stream a file (20MB) using the chunked transfer encoding
from the server to clients.
Currently my wsgi application looks like this but it is not doing
chunked transfer encoding.
Any advice on how to make it work with chunked transfer encoding ?
class Streamer(object):
def __init__(self):
pass
def __call__(self, environ, start_response):
request = Request(environ)
filename = os.getcwd() + "/static/bookmarks-lavie.xml"
try:
f = wrap_file(environ, open(filename) )
response = Response(f,direct_passthrough=True)
response.isStreamed = True
except HTTPException, e:
response = e
return ClosingIterator(response(environ, start_response))
--
You received this message because you are subscribed to the Google Groups
"pocoo-libs" 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/pocoo-libs?hl=en.