Various mods to support chunked-encoding.