Various mods to support chunked-encoding.
Merge pull request #29 from jfwood/master

Various mods to support chunked-encoding.