WSGI question: reading headers before message body has been read
Petite Abeille
petite.abeille at gmail.com
Sun Jan 18 14:43:21 EST 2009
On Jan 18, 2009, at 8:01 PM, Ron Garret wrote:
> def application(environ, start_response):
> status = "200 OK"
> headers = [('Content-Type', 'text/html'), ]
> start_response(status, headers)
> if int(environ['CONTENT_LENGTH'])>1000: return 'File too big'
How would that work for chunked transfer-encoding?
Cheers,
--
PA.
http://alt.textdrive.com/nanoki/
More information about the Python-list
mailing list