[ruby-core:60506] [ruby-trunk - Bug #9467] Net::HTTP does unzip zipped content

From: amitavmohanty01@...
Date: 2014-02-05 11:42:14 UTC
List: ruby-core #60506
Issue #9467 has been updated by Amitav Mohanty.


Hey

I found the issue to be occurring in rails console but not in IRB. I should have tested it before. The gem right_aws was causing the issue it seems.

Regards,

----------------------------------------
Bug #9467: Net::HTTP does unzip zipped content
https://bugs.ruby-lang.org/issues/9467#change-44970

* Author: Amitav Mohanty
* Status: Feedback
* Priority: Normal
* Assignee: Amitav Mohanty
* Category: lib
* Target version: 
* ruby -v: ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-linux]
* Backport: 
----------------------------------------
According to the Compression section of the documentation of Net::HTTP, it should automatically uncompress compressed responses. However, when I tried with a number of JSON requests with different servers, I am not getting automatic decompression.

require 'net/http'
uri = URI("http://yourhost.com")
http = Net::HTTP.new(uri.host, uri.port)
res = http.get(uri.request_uri)

You can test hitting http://vimeo.com/api/oembed.json?url=http://vimeo.com/69655841&width=150



-- 
http://bugs.ruby-lang.org/

In This Thread

Prev Next