uv-rays 2.3.1 → 2.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3e353fd7111af33397aa886f1ac63dd04f98c77a
4
- data.tar.gz: 022c6fd79ee1e2c63126f320051b0eec490eca56
3
+ metadata.gz: d63b99f6e70b3be80d704ecb87b5ce15fe045076
4
+ data.tar.gz: 9694e4109fd53fa215814bd5ed349146548a24b2
5
5
  SHA512:
6
- metadata.gz: 41d012acf5a07242274956c7807332e185a91a2173f33a5f7c508c0e01076e3d96a4d0517e0d822aeb81037ef2f797c4422afe4f02bebea4b9b47ccea0882fa2
7
- data.tar.gz: 1b9f591075b747c840a7d47d75903459e49afef2c44f99cafad7c3a022552ffb49a1458e8756e71dd9f28301d4302050ceae65e95242b1fa8f0aa7244b186b77
6
+ metadata.gz: da34409c84b8c7e016fb3c72f3fcc7e19f33b4f9a0e370e426b0bb99b5d8e5b8a6155dc58fe0a852b06a98574ec9dd6cacf35d939bb4f08ceb37a7a887bd5bdb
7
+ data.tar.gz: b09991e8da993700b8ab20f723472ada5aeb4cf202fcc155aeda2bc7e58dfeef2fe4957010b22511d640f5a817d4c587bad0195b4c2a33eb16662bf8f982f3f6
@@ -55,7 +55,12 @@ module UV
55
55
 
56
56
  if proxy
57
57
  super(proxy[:host], proxy[:port])
58
- connect_send_handshake(host, port, proxy) if tls
58
+ if tls
59
+ @negotiating = true
60
+ @proxy = proxy
61
+ @connect_host = host
62
+ @connect_port = port
63
+ end
59
64
  else
60
65
  super(host, port)
61
66
  start_tls if tls
@@ -68,7 +73,6 @@ module UV
68
73
  end
69
74
 
70
75
  def connect_send_handshake(target_host, target_port, proxy)
71
- @negotiating = true
72
76
  header = String.new("CONNECT #{target_host}:#{target_port} HTTP/1.0\r\n")
73
77
  if proxy[:username] || proxy[:password]
74
78
  encoded_credentials = Base64.strict_encode64([proxy[:username], proxy[:password]].join(":"))
@@ -99,7 +103,11 @@ module UV
99
103
  end
100
104
 
101
105
  def on_connect(transport)
102
- @client.connection_ready unless @negotiating
106
+ if @negotiating
107
+ connect_send_handshake(@connect_host, @connect_port, @proxy)
108
+ else
109
+ @client.connection_ready
110
+ end
103
111
  end
104
112
 
105
113
  def on_close
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UV
4
- VERSION = '2.3.1'
4
+ VERSION = '2.3.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uv-rays
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 2.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen von Takach