fix http request and gzip encoding