On Jan 18, 11:43 am, Petite Abeille <petite.abei...@gmail.com> wrote:
> 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?

It wouldn't.  But many clients don't use chunked-transfer-encoding
when uploading files whose size is known.  In that case it would be
nice to let users know that their upload is going to fail BEFORE they
waste hours waiting for 10GB of data to go down the wire.

rg

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to