From: Loren Segal Date: 2009-08-08T07:06:02+09:00 Subject: [ruby-core:24812] [Bug #1907] ssl_timeout cannot be set in HTTPS request Bug #1907: ssl_timeout cannot be set in HTTPS request http://redmine.ruby-lang.org/issues/show/1907 Author: Loren Segal Status: Open, Priority: Normal Category: core ruby -v: ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-darwin9.6.0] 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 # 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 `
' 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? ---------------------------------------- http://redmine.ruby-lang.org