]> git.openstreetmap.org Git - rails.git/blob - vendor/plugins/open_id_authentication/lib/open_id_authentication/timeout_fixes.rb
merge 19601:19888 of rails_port into the openID branch
[rails.git] / vendor / plugins / open_id_authentication / lib / open_id_authentication / timeout_fixes.rb
1 # http://trac.openidenabled.com/trac/ticket/156
2 module OpenID
3   @@timeout_threshold = 20
4
5   def self.timeout_threshold
6     @@timeout_threshold
7   end
8
9   def self.timeout_threshold=(value)
10     @@timeout_threshold = value
11   end
12
13   class StandardFetcher
14     def make_http(uri)
15       http = @proxy.new(uri.host, uri.port)
16       http.read_timeout = http.open_timeout = OpenID.timeout_threshold
17       http
18     end
19   end
20 end