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 +4 -4
- data/lib/uv-rays/http_endpoint.rb +11 -3
- data/lib/uv-rays/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d63b99f6e70b3be80d704ecb87b5ce15fe045076
|
4
|
+
data.tar.gz: 9694e4109fd53fa215814bd5ed349146548a24b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
-
|
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
|
data/lib/uv-rays/version.rb
CHANGED