When making a HTTParty GZipped request with Accept-Encoding set to gzip, deflate I would expect HTTParty to automatically un-GZip the response. What I am seeing is content which is still GZipped.
To reproduce
Create HTTParty get request with Accept-Encoding set to gzip, deflate as below
r = HTTParty.get("https://example.com", {headers: { "Accept-Encoding" => "gzip, deflate"}})
r.body => # Still GZipped content
Expected result
r = HTTParty.get("https://example.com", {headers: { "Accept-Encoding" => "gzip, deflate"}})
r.body => # Plain text content
This is related to post I created on campaignmonitor/createsend-ruby#58 where they are doing the above.
Edit: The response body has to be over 1KB for the compressions to kick in. Which is where the bug appears
When making a HTTParty GZipped request with
Accept-Encodingset togzip, deflateI would expect HTTParty to automatically un-GZip the response. What I am seeing is content which is still GZipped.To reproduce
Create HTTParty get request with
Accept-Encodingset togzip, deflateas belowExpected result
This is related to post I created on campaignmonitor/createsend-ruby#58 where they are doing the above.
Edit: The response body has to be over 1KB for the compressions to kick in. Which is where the bug appears