web2py/web2py — pull request #567 by kjkuan (2014-12-19 01:55:50+00:00)
Title: Fix the problem with chunked encoding with an empty body.

When the response body is empty, rocket won't send the final zero-length
terminating chunk for chunked encoding. I think this causes the browser
to wait for the connection close in order to tell the end of a
response. The symptom of this is that of a slow response, and it arises when, for example, one tries to use `gluon.streamer.streamer` directly, passing it an opened file object that is either an empty file or a file that has no more data to read from.