id	summary	reporter	owner	description	type	status	priority	milestone	component	resolution	keywords	cc	branch	branch_author	launchpad_bug
5915	transfer encoding chunked	rain.ning		"I am simulating chunked encoding with the code below. Twisted web server can successfully chunked transfer the content, however, the last chunk (0 + CRLF) is not sent, at least from the tcpdump, I don't see it.

{{{
#!python
f = open(DOC_ROOT + ""/"" + request.prepath[0] + ""/"" + request.prepath[1], 'rb')
while 1:
    chunk_size = random.randint(100, 1000)
    chunk_data = f.read(chunk_size)
    if len(chunk_data) != chunk_size:
        chunk_size = len(chunk_data)
    if chunk_size == 0:
        #comment the line below or not, does not change the result
        #request.write('0' + CRLF) 
        break
    request.write(chunk_data)
request.finish()
f.close()
}}}
"	defect	closed	normal		web	worksforme	chunked encoding	jknight			
