[Web-SIG] wsgiref questions

Guido van Rossum guido at python.org
Thu Dec 21 22:03:37 CET 2006


We decided to add chunking encoding to our own server, it wasn't all
that hard. What's the business of only doing it for certain status
codes?

On 12/20/06, Phillip J. Eby <pje at telecommunity.com> wrote:
> At 08:51 PM 12/20/2006 +0000, Sylvain Hellegouarch wrote:
>
> >[1] http://www.cherrypy.org/browser/trunk/cherrypy/wsgiserver.py
>
> Guido, it does appear that this server implements chunked encoding if you:
>
> 1. Use a status of 200, 203, or 206
> 2. Don't include a Content-Length header
> 3. *Yield* each chunk from your application as a separate block (i.e. don't
> use write())
>
> Sylvain, it appears that the above code has a bug in its chunked support if
> an application uses write() calls.  It will set the encoding to chunked,
> but it won't actually write the data in chunks when write() is called.  You
> might want to pass that information back to the CherryPy developers,
> although I think there are probably some reading this list.
>
> _______________________________________________
> Web-SIG mailing list
> Web-SIG at python.org
> Web SIG: http://www.python.org/sigs/web-sig
> Unsubscribe: http://mail.python.org/mailman/options/web-sig/guido%40python.org
>


-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Web-SIG mailing list