fix gzip header parsing in getContents