excon 0.93.0 → 0.94.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/data/cacert.pem +48 -2
- data/lib/excon/socket.rb +33 -17
- data/lib/excon/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d70a84195cac612e187bcd007f341f4fbac5486f19cfd74b2389a166fa45837a
|
4
|
+
data.tar.gz: '05950bcb9e7cc752aeff9dc15201e5abee70636ed75f703fdfc2b28bdd97b68d'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83711465351dcf3bd976aef38208b27d4704d2cfb35d67f4be0f0d732cd4ee4e164bfab1c3a0f8ac5f6db6fe14179c7c7a932431392a6fe56c87b3f89814a6e6
|
7
|
+
data.tar.gz: d28d63ee0decef91a3ac94d6919a66db17d4dbf64687cfb8ecb4a52a420511e9d97e9e7929f01bb5e6624abf7d6aef874ffce2736ae25cb0e038c5f4f8e577d7
|
data/data/cacert.pem
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
##
|
2
2
|
## Bundle of CA Root Certificates
|
3
3
|
##
|
4
|
-
## Certificate data from Mozilla as of: Tue
|
4
|
+
## Certificate data from Mozilla as of: Tue Oct 11 03:12:05 2022 GMT
|
5
5
|
##
|
6
6
|
## This is a bundle of X.509 certificates of public Certificate Authorities
|
7
7
|
## (CA). These were automatically extracted from Mozilla's root certificates
|
@@ -14,7 +14,7 @@
|
|
14
14
|
## Just configure this file as the SSLCACertificateFile.
|
15
15
|
##
|
16
16
|
## Conversion done with mk-ca-bundle.pl version 1.29.
|
17
|
-
## SHA256:
|
17
|
+
## SHA256: 3ff8bd209b5f2e739b9f2b96eacb694a774114685b02978257824f37ff528f71
|
18
18
|
##
|
19
19
|
|
20
20
|
|
@@ -3458,3 +3458,49 @@ zPUwHQYDVR0OBBYEFP+CMXI++cRmbK04ntGwUYilkMz1MA4GA1UdDwEB/wQEAwIBBjAKBggqhkjO
|
|
3458
3458
|
PQQDAwNpADBmAjEA5gVYaWHlLcoNy/EZCL3W/VGSGn5jVASQkZo1kTmZ+gepZpO6yGjUij/67W4W
|
3459
3459
|
Aie3AjEA3VoXK3YdZUKWpqxdinlW2Iob35reX8dQj7FbcQwm32pAAOwzkSFxvmjkI6TZraE3
|
3460
3460
|
-----END CERTIFICATE-----
|
3461
|
+
|
3462
|
+
Security Communication RootCA3
|
3463
|
+
==============================
|
3464
|
+
-----BEGIN CERTIFICATE-----
|
3465
|
+
MIIFfzCCA2egAwIBAgIJAOF8N0D9G/5nMA0GCSqGSIb3DQEBDAUAMF0xCzAJBgNVBAYTAkpQMSUw
|
3466
|
+
IwYDVQQKExxTRUNPTSBUcnVzdCBTeXN0ZW1zIENPLixMVEQuMScwJQYDVQQDEx5TZWN1cml0eSBD
|
3467
|
+
b21tdW5pY2F0aW9uIFJvb3RDQTMwHhcNMTYwNjE2MDYxNzE2WhcNMzgwMTE4MDYxNzE2WjBdMQsw
|
3468
|
+
CQYDVQQGEwJKUDElMCMGA1UEChMcU0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UE
|
3469
|
+
AxMeU2VjdXJpdHkgQ29tbXVuaWNhdGlvbiBSb290Q0EzMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A
|
3470
|
+
MIICCgKCAgEA48lySfcw3gl8qUCBWNO0Ot26YQ+TUG5pPDXC7ltzkBtnTCHsXzW7OT4rCmDvu20r
|
3471
|
+
hvtxosis5FaU+cmvsXLUIKx00rgVrVH+hXShuRD+BYD5UpOzQD11EKzAlrenfna84xtSGc4RHwsE
|
3472
|
+
NPXY9Wk8d/Nk9A2qhd7gCVAEF5aEt8iKvE1y/By7z/MGTfmfZPd+pmaGNXHIEYBMwXFAWB6+oHP2
|
3473
|
+
/D5Q4eAvJj1+XCO1eX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O5DtxnVW5inkYO0QR4ynKudtml
|
3486
|
+
+LLfiAlhi+8kTtFZP1rUPcmTPCtk9YENFpb3ksP+MW/oKjJ0DvRMmEoYDjBU1cXrvMUVnuiZIesn
|
3487
|
+
KwkK2/HmcBhWuwzkvvnoEKQTkrgc4NtnHVMDpCKn3F2SEDzq//wbEBrD2NCcnWXL0CsnMQMeNuE9
|
3488
|
+
dnUM/0Umud1RvCPHX9jYhxBAEg09ODfnRDwYwFMJZI//1ZqmfHAuc1Uh6N//g7kdPjIe1qZ9LPFm
|
3489
|
+
6Vwdp6POXiUyK+OVrCoHzrQoeIY8LaadTdJ0MN1kURXbg4NR16/9M51NZg==
|
3490
|
+
-----END CERTIFICATE-----
|
3491
|
+
|
3492
|
+
Security Communication ECC RootCA1
|
3493
|
+
==================================
|
3494
|
+
-----BEGIN CERTIFICATE-----
|
3495
|
+
MIICODCCAb6gAwIBAgIJANZdm7N4gS7rMAoGCCqGSM49BAMDMGExCzAJBgNVBAYTAkpQMSUwIwYD
|
3496
|
+
VQQKExxTRUNPTSBUcnVzdCBTeXN0ZW1zIENPLixMVEQuMSswKQYDVQQDEyJTZWN1cml0eSBDb21t
|
3497
|
+
dW5pY2F0aW9uIEVDQyBSb290Q0ExMB4XDTE2MDYxNjA1MTUyOFoXDTM4MDExODA1MTUyOFowYTEL
|
3498
|
+
MAkGA1UEBhMCSlAxJTAjBgNVBAoTHFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xKzApBgNV
|
3499
|
+
BAMTIlNlY3VyaXR5IENvbW11bmljYXRpb24gRUNDIFJvb3RDQTEwdjAQBgcqhkjOPQIBBgUrgQQA
|
3500
|
+
IgNiAASkpW9gAwPDvTH00xecK4R1rOX9PVdu12O/5gSJko6BnOPpR27KkBLIE+CnnfdldB9sELLo
|
3501
|
+
5OnvbYUymUSxXv3MdhDYW72ixvnWQuRXdtyQwjWpS4g8EkdtXP9JTxpKULGjQjBAMB0GA1UdDgQW
|
3502
|
+
BBSGHOf+LaVKiwj+KBH6vqNm+GBZLzAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAK
|
3503
|
+
BggqhkjOPQQDAwNoADBlAjAVXUI9/Lbu9zuxNuie9sRGKEkz0FhDKmMpzE2xtHqiuQ04pV1IKv3L
|
3504
|
+
snNdo4gIxwwCMQDAqy0Obe0YottT6SXbVQjgUMzfRGEWgqtJsLKB7HOHeLRMsmIbEvoWTSVLY70e
|
3505
|
+
N9k=
|
3506
|
+
-----END CERTIFICATE-----
|
data/lib/excon/socket.rb
CHANGED
@@ -40,12 +40,14 @@ module Excon
|
|
40
40
|
|
41
41
|
def_delegators(:@socket, :close)
|
42
42
|
|
43
|
+
|
43
44
|
def initialize(data = {})
|
44
45
|
@data = data
|
45
46
|
@nonblock = data[:nonblock]
|
46
47
|
@port ||= @data[:port] || 80
|
47
48
|
@read_buffer = String.new
|
48
49
|
@eof = false
|
50
|
+
@backend_eof = false
|
49
51
|
connect
|
50
52
|
end
|
51
53
|
|
@@ -61,9 +63,22 @@ module Excon
|
|
61
63
|
|
62
64
|
def readline
|
63
65
|
if @nonblock && RUBY_VERSION.to_f > 1.8_7
|
64
|
-
|
65
|
-
|
66
|
-
|
66
|
+
result = String.new
|
67
|
+
block = @read_buffer
|
68
|
+
@read_buffer = String.new
|
69
|
+
|
70
|
+
loop do
|
71
|
+
idx = block.index("\n")
|
72
|
+
if idx.nil?
|
73
|
+
result << block
|
74
|
+
else
|
75
|
+
add_to_read_buffer(block.slice!(idx+1, block.length))
|
76
|
+
result << block
|
77
|
+
break
|
78
|
+
end
|
79
|
+
block = read_nonblock(@data[:chunk_size]) || raise(EOFError)
|
80
|
+
end
|
81
|
+
result
|
67
82
|
else # nonblock/legacy
|
68
83
|
begin
|
69
84
|
Timeout.timeout(@data[:read_timeout]) do
|
@@ -172,20 +187,21 @@ module Excon
|
|
172
187
|
end
|
173
188
|
end
|
174
189
|
|
190
|
+
def add_to_read_buffer(str)
|
191
|
+
@read_buffer << str
|
192
|
+
@eof = false
|
193
|
+
end
|
194
|
+
|
175
195
|
def read_nonblock(max_length)
|
176
196
|
begin
|
177
|
-
|
178
|
-
|
179
|
-
@read_buffer << @socket.read_nonblock(max_length - @read_buffer.length)
|
180
|
-
end
|
181
|
-
else
|
182
|
-
loop do
|
183
|
-
@read_buffer << @socket.read_nonblock(@data[:chunk_size])
|
184
|
-
end
|
197
|
+
while !@backend_eof && (!max_length || @read_buffer.length < max_length)
|
198
|
+
@read_buffer << @socket.read_nonblock(@data[:chunk_size])
|
185
199
|
end
|
186
200
|
rescue OpenSSL::SSL::SSLError => error
|
187
201
|
if error.message == 'read would block'
|
188
|
-
|
202
|
+
if @read_buffer.empty?
|
203
|
+
select_with_timeout(@socket, :read) && retry
|
204
|
+
end
|
189
205
|
else
|
190
206
|
raise(error)
|
191
207
|
end
|
@@ -195,10 +211,10 @@ module Excon
|
|
195
211
|
select_with_timeout(@socket, :read) && retry
|
196
212
|
end
|
197
213
|
rescue EOFError
|
198
|
-
@
|
214
|
+
@backend_eof = true
|
199
215
|
end
|
200
216
|
|
201
|
-
if max_length
|
217
|
+
ret = if max_length
|
202
218
|
if @read_buffer.empty?
|
203
219
|
nil # EOF met at beginning
|
204
220
|
else
|
@@ -208,6 +224,8 @@ module Excon
|
|
208
224
|
# read until EOFError, so return everything
|
209
225
|
@read_buffer.slice!(0, @read_buffer.length)
|
210
226
|
end
|
227
|
+
@eof = @backend_eof && @read_buffer.empty?
|
228
|
+
ret
|
211
229
|
end
|
212
230
|
|
213
231
|
def read_block(max_length)
|
@@ -219,9 +237,7 @@ module Excon
|
|
219
237
|
raise(error)
|
220
238
|
end
|
221
239
|
rescue *READ_RETRY_EXCEPTION_CLASSES
|
222
|
-
|
223
|
-
select_with_timeout(@socket, :read) && retry
|
224
|
-
end
|
240
|
+
select_with_timeout(@socket, :read) && retry
|
225
241
|
rescue EOFError
|
226
242
|
@eof = true
|
227
243
|
end
|
data/lib/excon/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: excon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.94.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dpiddy (Dan Peterson)
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2022-
|
13
|
+
date: 2022-11-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|