Project

General

Profile

Actions

Bug #9467

closed

Net::HTTP does unzip zipped content

Added by dknight (Amitav Mohanty) over 10 years ago. Updated almost 5 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-linux]
Backport:
[ruby-core:60353]

Description

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

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0