[Twisted-Python] web2: http Content-Length header

Pieter Grimmerink mailinglists at grimmerink.nl
Mon Dec 4 16:16:17 EST 2006

Hi all,

I'm using twisted.web2.client.HTTPClientProtocol to implement a HTTP 
downloader object.

In order to show the download progress, I need the Content-Length header, 
which is found in the server response.
But it turns out this header is being removed from the response, because it 
is listed in connHeaderNames, twisted/web2/channel/http.py line 217.

Leaving 'content-length' out of this list gives me the valid content-length 
header in the response.

Is it really necessary to remove the content-length header from the 

Regards, Pieter

More information about the Twisted-Python mailing list