Hi Guys!<br><br>I&#39;m new to the twisted framework and I&#39;m using it to write a simple HTTPProxy with rewrite capabilities.<br><br>While calling ProxyCiient.handleHeader method, it seems that Content-Length field is being added. Notice that I say &quot;add&quot; instead of &quot;set&quot;:<br>
 <br>    def handleHeader(self, key, value):<br>        <b>if key.lower() in [&#39;server&#39;, &#39;date&#39;, &#39;content-type&#39;]:</b><br>            self.father.responseHeaders.setRawHeaders(key, [value])<br>        else:<br>
            <b>self.father.responseHeaders.addRawHeader(key, value)</b><br><br><br>Look at this headers that I get if I use handleHeader method:<br><br>HTTP/1.1 200 OK<br><b>Content-Length: 3025<br>Content-Length: 53</b><br>
Host: localhost:8001<br>Accept: */*<br>Server: Coco el servidor<br>Connection: close<br>Date: Tue, 07 Aug 2012 20:35:13 GMT<br>User-Agent: curl/7.19.7 (i486-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/<a href="http://1.2.3.3">1.2.3.3</a> libidn/1.15<br>
Content-Type: text/html<br><br><br>So question is, am I using it properly? I&#39;m adjusting the content length field as the data changed.<br><br>Thanks in advanced, Daniel<br><br clear="all"> &quot;En economía no hay nada misterioso ni inaccesible al entendimiento del hombre de la calle. Si hay un misterio, reside él en el oculto propósito que puede perseguir el economista y que no es otro que la disimulación del interés concreto a que se sirve.&quot; <br>
<br>A. Jauretche<br>