avoid IPv6 issue.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0ad0462183
commit
a1782f4e6a
@ -4,13 +4,13 @@ require 'test/unit'
|
|||||||
class HTTPSProxyTest < Test::Unit::TestCase
|
class HTTPSProxyTest < Test::Unit::TestCase
|
||||||
def test_https_proxy_authentication
|
def test_https_proxy_authentication
|
||||||
TCPServer.open(0) {|serv|
|
TCPServer.open(0) {|serv|
|
||||||
_, port, _, ipaddr = serv.addr
|
_, port, _, _ = serv.addr
|
||||||
t = Thread.new {
|
t = Thread.new {
|
||||||
proxy = Net::HTTP.Proxy(ipaddr, port, 'user', 'password')
|
proxy = Net::HTTP.Proxy("127.0.0.1", port, 'user', 'password')
|
||||||
http = proxy.new("foo.example.org", 8000)
|
http = proxy.new("foo.example.org", 8000)
|
||||||
http.use_ssl = true
|
http.use_ssl = true
|
||||||
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
||||||
http.start {|http| }
|
http.start
|
||||||
}
|
}
|
||||||
sock = serv.accept
|
sock = serv.accept
|
||||||
proxy_request = sock.gets("\r\n\r\n")
|
proxy_request = sock.gets("\r\n\r\n")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user