I have managed to build Ruby 1.9 on my windows machine, but Net::HTTP calls
just hang. Here's my test script:
require 'net/http'
puts "Ruby version: #{RUBY_VERSION}"
puts "opening local site"
Net::HTTP.start("localhost", "8808") do |http|
puts "in block"
puts "Got response with length: #{http.get("/").body.length}"
end
puts "opening remote"
proxy = URI.parse(ENV["http_proxy"])
Net::HTTP.Proxy(proxy.host, proxy.port).start("www.google.com") do |http|
puts "in block"
puts "Got (proxy) response with length: #{http.get("/").body.length}"
end
Under 1.8.5, I get this output:
ruby test.rb
Ruby version: 1.8.5
opening local site
in block
Got response with length: 19575
opening remote
in block
Got (proxy) response with length: 4156
But under 1.9, it hangs:
ruby19 test.rb
Ruby version: 1.9.0
opening local site
^C
Does anybody have a suggestion for what might be going on? Thanks!
Justin