solve a bug in chunked and gzip