# Help with Ruby 1.9 - Net::HTTP calls hang on windows

**URL:** <https://www.ruby-forum.com/t/help-with-ruby-1-9-net-http-calls-hang-on-windows/91860>\
**Category:** Ruby\
**Created:** [April 12, 2007, 10:20pm UTC](https://www.ruby-forum.com/t/help-with-ruby-1-9-net-http-calls-hang-on-windows/91860 "2007-04-12T22:20:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vtphysguy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/77aa72/32.png) [@vtphysguy](https://www.ruby-forum.com/u/vtphysguy)\
**Post date:** [April 12, 2007, 10:20pm UTC](https://www.ruby-forum.com/t/help-with-ruby-1-9-net-http-calls-hang-on-windows/91860/1 "2007-04-12T22:20:09Z")

</div>

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](http://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
