Improve the handling of chunk-encoded responses