webbit/webbit — pull request #106 by pk11 (2012-12-04 23:09:50+00:00)
Title: Add support for chunked responses

This changeset provides a simple way to implement HTTP streaming.

About the implementation:
- HttpResponse#chunked signals that the response is going to be a chunked one (i.e. "Transfer-Encoding: chunked")
- calling HttpResponse#write afterwards will write chunks to the channel
- often times streaming is continuous (i.e. response#end never gets called) unless staleConnectionTimeout kicks in
- however, if response#end does get called, make sure to write a DefaultHttpChunk with 0 byte to the channel to signal the browser that streaming is over