diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-14 05:32:58 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-14 05:32:58 +0000 |
commit | 64db9dcbd5451f5f3ad4ef69662311a7cbb44a95 (patch) | |
tree | 257233dd477b1dda8926e730904209d36f76b05c /lib/net | |
parent | 632ab19c4ddfdd7bf73adf0215e488382f02bb1a (diff) | |
download | ruby-64db9dcbd5451f5f3ad4ef69662311a7cbb44a95.tar.gz |
* lib/net/http.rb: Removed OpenSSL dependency from Net::HTTP.
* test/net/http/test_http.rb: Remove Zlib dependency from tests.
* test/net/http/test_http_request.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net')
-rw-r--r-- | lib/net/http.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb index 4b1a65767f..cc1b1c4a1f 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -1424,7 +1424,9 @@ module Net #:nodoc: raise rescue Net::ReadTimeout, IOError, EOFError, Errno::ECONNRESET, Errno::ECONNABORTED, Errno::EPIPE, - OpenSSL::SSL::SSLError, Timeout::Error => exception + # avoid a dependency on OpenSSL + defined?(OpenSSL::SSL) ? OpenSSL::SSL::SSLError : IOError, + Timeout::Error => exception if count == 0 && IDEMPOTENT_METHODS_.include?(req.method) count += 1 @socket.close if @socket and not @socket.closed? |