← Back to team overview

dulwich-users team mailing list archive

Re: Traceback when testing the web server

 

On Tue, Mar 1, 2011 at 5:00 PM, Dave Borowitz <dborowitz@xxxxxxxxxx> wrote:

> Awesome! If, while you're at it, you managed to get rid of
> _LengthLimitedFile, at least for the gzipped case, that would be cool too.

I looked over this class, and I'm assuming it's to conform to this
part of th WSGI spec [1]? According to my reading of the spec, this
behavior isn't strictly required. It's neighborly to do it, though.
I'm not sure how handling it in the gzipped case would work. Would you
want to move the content-length logic from handle_service_request to
the gzip middleware? Otherwise we'd have a leaky abstraction to figure
out if it had already been handled or not.


1. http://www.python.org/dev/peps/pep-3333/#handling-the-content-length-header



References