Permalink
Browse files

Fixed a SSL failure. If the ssl var is nil it will be frozen, which i…

…s not correct. Adding an explicit check for nil seems to fix the problem
  • Loading branch information...
valo committed Jan 15, 2010
1 parent 0ddf33b commit e8c9d0ef72f55461ed33d4a0ee283683cb0f83aa
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/mechanize/chain/ssl_resolver.rb
@@ -20,7 +20,7 @@ def handle(ctx, params)
ssl = http_obj.instance_variable_get(:@ssl_context)
end
if uri.scheme == 'https' && ! http_obj.started? && ! ssl.frozen?
if uri.scheme == 'https' && ! http_obj.started? && (ssl.nil? || ! ssl.frozen?)
http_obj.use_ssl = true
http_obj.verify_mode = OpenSSL::SSL::VERIFY_NONE
if @ca_file

0 comments on commit e8c9d0e

Please sign in to comment.