Bug #1907
Updated by jeremyevans0 (Jeremy Evans) over 4 years ago
=begin Net::HTTPS defines SSL_ATTRIBUTES which, as I understand, are attributes that can be set on an HTTP object and includes `ssl_timeout` However when applying these attributes on the SSLContext, the following exception is raised: NoMethodError: undefined method `ssl_timeout=' for #<OpenSSL::SSL::SSLContext:0x6511fc> from /usr/local/lib/ruby19/1.9.1/openssl/ssl.rb:39:in `block in set_params' from /usr/local/lib/ruby19/1.9.1/openssl/ssl.rb:39:in `each' from /usr/local/lib/ruby19/1.9.1/openssl/ssl.rb:39:in `set_params' from /usr/local/lib/ruby19/1.9.1/net/http.rb:591:in `connect' from /usr/local/lib/ruby19/1.9.1/net/http.rb:574:in `do_start' from /usr/local/lib/ruby19/1.9.1/net/http.rb:563:in `start' from /usr/local/lib/ruby19/1.9.1/net/http.rb:1094:in `request' from (irb):16 from /usr/local/bin/irb:12:in `<main>' The code being run is: require 'net/https' http = Net::HTTP.new("example.com") http.use_ssl = true http.ssl_timeout = 1 http.request('hi') # exception is raised here SSLContext does not implement ssl_timeout= but it *does* have timeout=, so this attribute should be handled specially, or perhaps be aliased in SSLContext? =end