A firewall issue on my server revealed a problem with the OpenID::StandardFetcher?. I'd like to add a nicer timeout to the Net::HTTP connections, with an optional method to configure them. Here's my suggestion:
module OpenID
# default timeout that the ruby-yadis lib uses
@@timeout_threshold = 20
def timeout_threshold
@@timeout_threashold
end
def timeout_threshold=(value)
@@timeout_threashold = value
end
class StandardFetcher
def make_http(uri)
http = @proxy.new(uri.host, uri.port)
http.read_timeout = http.open_timeout = OpenID.timeout_threshold
http
end
end
end
Let me know if this is kosher. I'd be happy to turn this into a full tested patch with any suggestions. Thanks.