You can copy and paste this in irb, but...this is a really strange 
problem. If ssh into my server in Oregon and paste the following code in 
irb it works just fine. If I ssh in one of my servers in Boston and 
paste the same code in irb I get a connection refused error. Any idea 
why this is happening?

Here is the code:


require 'net/http'
require 'uri'

uri = 
URI.parse('http://www.ticketmaster.com/event/0A003C8C9F3F6DF3?artistid=735836&majorcatid=10001&minorcatid=60')
http = Net::HTTP::Proxy(nil).new(uri.host)
req = Net::HTTP::Get.new(uri.path)
req.add_field 'User-Agent', 'Mozilla/5.0 (X11; U; Linux i686; en-US; 
rv:1.8.0.3) Gecko/20060425 SUSE/1.5.0.3-7 Firefox/1.5.0.3'
req.add_field 'Accept', 
'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5'
req.add_field 'Accept-Language', 'en-us,en;q=0.5'
req.add_field 'Accept-Charset', 'ISO-8859-1,utf-8;q=0.7,*;q=0.7'
req.add_field 'Keep-Alive', '300'
req.add_field 'Connection', 'keep-alive'
res = http.start { |http| http.request req }



Also, the reason I added all of those headers is because ticket master 
checks for them. As far as I can tell, those headers are generic and I'm 
not sure why it would work on one server and not on another.

Any help is greatly appreciated.

-- 
Posted via http://www.ruby-forum.com/.