fix gzip header parsing in getContents

Curl on centOS returns headers in wrapper_data['headers'] array. So i added this case to properly parse gzip headers.