[Twisted-Python] turning off chunked transfer-encoding

Hi, I noticed that when using twisted.internet.http and returning a Content-type of application/json, the server responds with chunked transfer encoding. I'm debugging a client problem and I'd like to turn chunked transfer encoding off. Is this possible? Thanks, Mike -- Michael P. Soulier <msoulier@digitaltorque.ca> "Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction." --Albert Einstein

On Mon, 2010-05-24 at 22:07 -0400, Michael P. Soulier wrote:
Hi,
I noticed that when using twisted.internet.http and returning a Content-type of application/json, the server responds with chunked transfer encoding.
Chunked encoding has nothing to do with the content type. It is used if you do not set a content-length header. So, figure out your response's length (in bytes), and set the content-length header to that.

On 25/05/10 Itamar Turner-Trauring said:
Chunked encoding has nothing to do with the content type. It is used if you do not set a content-length header.
So, figure out your response's length (in bytes), and set the content-length header to that.
I'll try that, thanks. Mike -- Michael P. Soulier <msoulier@digitaltorque.ca> "Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction." --Albert Einstein
participants (2)
-
Itamar Turner-Trauring
-
Michael P. Soulier