Fixes gzip issue, curl errors go to client