httpclient 2.1.7.1 → 2.1.7.2

Sign up to get free protection for your applications and to get access to all the features.
data/lib/httpclient.rb CHANGED
@@ -210,7 +210,7 @@ require 'httpclient/cookie'
210
210
  # ruby -rhttpclient -e 'p HTTPClient.head(ARGV.shift).header["last-modified"]' http://dev.ctor.org/
211
211
  #
212
212
  class HTTPClient
213
- VERSION = '2.1.7.1'
213
+ VERSION = '2.1.7.2'
214
214
  RUBY_VERSION_STRING = "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]"
215
215
  /: (\S+) (\S+)/ =~ %q$Id$
216
216
  LIB_NAME = "(#{$1}/#{$2}, #{RUBY_VERSION_STRING})"
@@ -25,8 +25,6 @@ class HTTPClient
25
25
 
26
26
  # Represents a Site: protocol scheme, host String and port Number.
27
27
  class Site
28
- EMPTY = Site.new.freeze
29
-
30
28
  # Protocol scheme.
31
29
  attr_accessor :scheme
32
30
  # Host String.
@@ -78,6 +76,8 @@ class HTTPClient
78
76
  def inspect # :nodoc:
79
77
  sprintf("#<%s:0x%x %s>", self.class.name, __id__, addr)
80
78
  end
79
+
80
+ EMPTY = Site.new.freeze
81
81
  end
82
82
 
83
83
 
@@ -744,6 +744,8 @@ class HTTPClient
744
744
  @debug_dev << "! CONNECT TO #{site.host}:#{site.port}\n" if @debug_dev
745
745
  if str = @test_loopback_http_response.shift
746
746
  socket = LoopBackSocket.new(site.host, site.port, str)
747
+ elsif @socket_local == Site::EMPTY
748
+ socket = TCPSocket.new(site.host, site.port)
747
749
  else
748
750
  socket = TCPSocket.new(site.host, site.port, @socket_local.host, @socket_local.port)
749
751
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: httpclient
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 2.1.7.1
5
+ version: 2.1.7.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - NAKAMURA, Hiroshi
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-03-22 00:00:00 +09:00
13
+ date: 2011-03-23 00:00:00 +09:00
14
14
  default_executable:
15
15
  dependencies: []
16
16