mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* 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
This commit is contained in:
		
							parent
							
								
									632ab19c4d
								
							
						
					
					
						commit
						64db9dcbd5
					
				
					 4 changed files with 13 additions and 4 deletions
				
			
		| 
						 | 
					@ -1,3 +1,10 @@
 | 
				
			||||||
 | 
					Thu Feb 14 14:31:43 2013  Eric Hodel  <drbrain@segment7.net>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						* 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.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Thu Feb 14 11:08:15 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>
 | 
					Thu Feb 14 11:08:15 2013  Nobuyoshi Nakada  <nobu@ruby-lang.org>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	* class.c (include_modules_at): detect cyclic prepend with original
 | 
						* class.c (include_modules_at): detect cyclic prepend with original
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1424,7 +1424,9 @@ module Net   #:nodoc:
 | 
				
			||||||
        raise
 | 
					        raise
 | 
				
			||||||
      rescue Net::ReadTimeout, IOError, EOFError,
 | 
					      rescue Net::ReadTimeout, IOError, EOFError,
 | 
				
			||||||
             Errno::ECONNRESET, Errno::ECONNABORTED, Errno::EPIPE,
 | 
					             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)
 | 
					        if count == 0 && IDEMPOTENT_METHODS_.include?(req.method)
 | 
				
			||||||
          count += 1
 | 
					          count += 1
 | 
				
			||||||
          @socket.close if @socket and not @socket.closed?
 | 
					          @socket.close if @socket and not @socket.closed?
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -442,7 +442,7 @@ module TestNetHTTP_version_1_2_methods
 | 
				
			||||||
      assert_equal $test_net_http_data.size, res.body.size
 | 
					      assert_equal $test_net_http_data.size, res.body.size
 | 
				
			||||||
      assert_equal $test_net_http_data, res.body
 | 
					      assert_equal $test_net_http_data, res.body
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      assert res.decode_content, 'Bug #7831'
 | 
					      assert res.decode_content, 'Bug #7831' if Net::HTTP::HAVE_ZLIB
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -62,7 +62,7 @@ class HTTPRequestTest < Test::Unit::TestCase
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    refute req2.decode_content,
 | 
					    refute req2.decode_content,
 | 
				
			||||||
           'Bug #7381 - do not decode content if the user overrides'
 | 
					           'Bug #7381 - do not decode content if the user overrides'
 | 
				
			||||||
  end
 | 
					  end if Net::HTTP::HAVE_ZLIB
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def test_header_set
 | 
					  def test_header_set
 | 
				
			||||||
    req = Net::HTTP::Get.new '/'
 | 
					    req = Net::HTTP::Get.new '/'
 | 
				
			||||||
| 
						 | 
					@ -73,7 +73,7 @@ class HTTPRequestTest < Test::Unit::TestCase
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    refute req.decode_content,
 | 
					    refute req.decode_content,
 | 
				
			||||||
           'Bug #7831 - do not decode content if the user overrides'
 | 
					           'Bug #7831 - do not decode content if the user overrides'
 | 
				
			||||||
  end
 | 
					  end if Net::HTTP::HAVE_ZLIB
 | 
				
			||||||
 | 
					
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue