@@ -282,7 +282,7 @@ def test_connect
282
282
# 3. ------- GET or POST ---------->
283
283
#
284
284
key = TEST_KEY_RSA2048
285
- cert = make_certificate ( key , "localhost " )
285
+ cert = make_certificate ( key , "127.0.0.1 " )
286
286
s_config = {
287
287
:SSLEnable => true ,
288
288
:ServerName => "localhost" ,
@@ -300,7 +300,7 @@ def test_connect
300
300
res . body = "SSL #{ req . request_method } #{ req . path } #{ req . body } "
301
301
}
302
302
TestWEBrick . start_httpproxy ( config ) { |server , addr , port , log |
303
- http = Net ::HTTP . new ( "localhost " , s_port , addr , port )
303
+ http = Net ::HTTP . new ( "127.0.0.1 " , s_port , addr , port )
304
304
http . use_ssl = true
305
305
http . verify_callback = Proc . new do |preverify_ok , store_ctx |
306
306
store_ctx . current_cert . to_der == cert . to_der
@@ -398,7 +398,7 @@ def test_upstream_proxy
398
398
# 3. ---------- GET or POST -------------->
399
399
#
400
400
key = TEST_KEY_RSA2048
401
- cert = make_certificate ( key , "localhost " )
401
+ cert = make_certificate ( key , "127.0.0.1 " )
402
402
s_config = {
403
403
:SSLEnable => true ,
404
404
:ServerName => "localhost" ,
@@ -409,7 +409,7 @@ def test_upstream_proxy
409
409
s_server . mount_proc ( "/" ) { |req2 , res |
410
410
res . body = "SSL #{ req2 . request_method } #{ req2 . path } #{ req2 . body } "
411
411
}
412
- http = Net ::HTTP . new ( "localhost " , s_port , addr , port , up_log . call + log . call + s_log . call )
412
+ http = Net ::HTTP . new ( "127.0.0.1 " , s_port , addr , port , up_log . call + log . call + s_log . call )
413
413
http . use_ssl = true
414
414
http . verify_callback = Proc . new do |preverify_ok , store_ctx |
415
415
store_ctx . current_cert . to_der == cert . to_der
0 commit comments