your sample code for ruby doesn't work for ruby 2.0

  • 1
  • Question
  • Updated 5 years ago
If you try it you get this: (On OS X 1.8.4)

/usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/net/http/response.rb:357:in `finish': incorrect header check (Zlib::DataError)
from /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/net/http/response.rb:357:in `finish'
from /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/net/http/response.rb:262:in `ensure in inflater'
from /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/net/http/response.rb:262:in `inflater'
from /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/net/http/response.rb:274:in `read_body_0'
from /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/net/http/response.rb:201:in `read_body'
from /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/open-uri.rb:328:in `block (2 levels) in open_http'
from /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/net/http.rb:1413:in `block (2 levels) in transport_request'
from /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/net/http/response.rb:162:in `reading_body'
from /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/net/http.rb:1412:in `block in transport_request'
from /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/net/http.rb:1403:in `catch'
from /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/net/http.rb:1403:in `transport_request'
from /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/net/http.rb:1376:in `request'
from /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/open-uri.rb:319:in `block in open_http'
from /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/net/http.rb:852:in `start'
from /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/open-uri.rb:313:in `open_http'
from /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/open-uri.rb:708:in `buffer_open'
from /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/open-uri.rb:210:in `block in open_loop'
from /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/open-uri.rb:208:in `catch'
from /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/open-uri.rb:208:in `open_loop'
from /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/open-uri.rb:149:in `open_uri'
from /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/open-uri.rb:688:in `open'
from /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/open-uri.rb:34:in `open'
Photo of Manuel Ortega

Manuel Ortega

  • 1 Post
  • 0 Reply Likes

Posted 5 years ago

  • 1

Be the first to post a reply!