Project

General

Profile

Backport #3510

ssl_timeout appears not to work in net/https

Added by amiklas (Andrew Miklas) over 9 years ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal

Description

=begin
It is possible to cause Net::HTTP.get to block indefinitely even when values are given for open_timeout, read_timeout, and ssl_timeout. The problem only happens when use_ssl? is true: the behaviour of non-SSL requests is as expected.

To reproduce:

  1. Run "listen.rb" in the background (simulates a misbehaving server that accepts connections but doesn't deliver any data)
  2. Run "http_test.rb" -- notice that the exception is delivered after 5 seconds, as expected.
  3. Run "https_test.rb" -- notice that the GET call never returns, and no timeout exception is delivered.

(Apologies if this is the wrong spot for this. Is net/https considered part of Ruby's standard library?)
=end


Files

listen.rb (216 Bytes) listen.rb amiklas (Andrew Miklas), 06/30/2010 05:25 PM
http_test.rb (125 Bytes) http_test.rb amiklas (Andrew Miklas), 06/30/2010 05:25 PM
https_test.rb (159 Bytes) https_test.rb amiklas (Andrew Miklas), 06/30/2010 05:25 PM

History

#1

Updated by nahi (Hiroshi Nakamura) about 9 years ago

  • Assignee set to nahi (Hiroshi Nakamura)

=begin

=end

#2

Updated by nahi (Hiroshi Nakamura) about 9 years ago

=begin
Note: SSL_connect invocation is blocking for now. (JRuby-OSSL as well)
=end

#3

Updated by nahi (Hiroshi Nakamura) about 9 years ago

=begin
Note: timeout for read (SSL_read) should work as you expected. Let me know if it doesn't work.
=end

#4

Updated by shyouhei (Shyouhei Urabe) about 9 years ago

  • Status changed from Open to Assigned

=begin

=end

#5

Updated by jeremyevans0 (Jeremy Evans) 4 months ago

  • ruby -v deleted (ruby 1.8.6 (2008-08-11 patchlevel 287) [i686-darwin9.7.0])
  • Target version deleted (Ruby 1.8.6)
  • Status changed from Assigned to Closed
  • Description updated (diff)
  • Project changed from Ruby 1.8 to Backport187
  • Tracker changed from Bug to Backport

Also available in: Atom PDF