excon 0.93.1 → 0.99.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CONTRIBUTORS.md +182 -140
- data/README.md +11 -1
- data/data/cacert.pem +2 -136
- data/excon.gemspec +0 -1
- data/lib/excon/connection.rb +11 -1
- data/lib/excon/constants.rb +2 -0
- data/lib/excon/response.rb +13 -0
- data/lib/excon/socket.rb +33 -11
- data/lib/excon/ssl_socket.rb +16 -0
- data/lib/excon/version.rb +1 -1
- data/lib/excon.rb +14 -4
- metadata +6 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4de69b0df9a1fc68f382e6d007845ddd9dac6ec8e6f0150b0988caafc604fc66
|
4
|
+
data.tar.gz: 3735d61f7219a99bfcfd8f953c7dd16f66b0232a794c602042f30a7eda7c9334
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 366bb5af60bbd24b607bb9306a5f1581e0daeb95881e33376e85a9a7892935758fb06c09d656f27ffd3f791fbcc372e9703bf738f08a10c5d46f06558a34e19e
|
7
|
+
data.tar.gz: a38b16b4e9fe30c66d75e96e39330f6661a3c4a906801e7eaade9c3efd4af8d86a804b224d264f777f8d13026c0c1dc18581120ce179c5bfd6cf8ae3e427cd10
|
data/CONTRIBUTORS.md
CHANGED
@@ -1,140 +1,182 @@
|
|
1
|
-
* Aaron Stone
|
2
|
-
* Adam
|
3
|
-
*
|
4
|
-
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
*
|
8
|
-
*
|
9
|
-
*
|
10
|
-
*
|
11
|
-
*
|
12
|
-
*
|
13
|
-
*
|
14
|
-
*
|
15
|
-
*
|
16
|
-
*
|
17
|
-
*
|
18
|
-
*
|
19
|
-
*
|
20
|
-
*
|
21
|
-
*
|
22
|
-
*
|
23
|
-
*
|
24
|
-
*
|
25
|
-
*
|
26
|
-
*
|
27
|
-
*
|
28
|
-
*
|
29
|
-
*
|
30
|
-
*
|
31
|
-
*
|
32
|
-
*
|
33
|
-
*
|
34
|
-
*
|
35
|
-
*
|
36
|
-
*
|
37
|
-
*
|
38
|
-
*
|
39
|
-
*
|
40
|
-
*
|
41
|
-
*
|
42
|
-
*
|
43
|
-
*
|
44
|
-
*
|
45
|
-
*
|
46
|
-
*
|
47
|
-
*
|
48
|
-
*
|
49
|
-
*
|
50
|
-
*
|
51
|
-
*
|
52
|
-
*
|
53
|
-
*
|
54
|
-
*
|
55
|
-
*
|
56
|
-
*
|
57
|
-
*
|
58
|
-
*
|
59
|
-
*
|
60
|
-
*
|
61
|
-
*
|
62
|
-
*
|
63
|
-
*
|
64
|
-
*
|
65
|
-
*
|
66
|
-
*
|
67
|
-
*
|
68
|
-
*
|
69
|
-
*
|
70
|
-
*
|
71
|
-
*
|
72
|
-
*
|
73
|
-
*
|
74
|
-
*
|
75
|
-
*
|
76
|
-
*
|
77
|
-
*
|
78
|
-
*
|
79
|
-
*
|
80
|
-
*
|
81
|
-
*
|
82
|
-
*
|
83
|
-
*
|
84
|
-
*
|
85
|
-
*
|
86
|
-
*
|
87
|
-
*
|
88
|
-
*
|
89
|
-
*
|
90
|
-
*
|
91
|
-
*
|
92
|
-
*
|
93
|
-
*
|
94
|
-
*
|
95
|
-
*
|
96
|
-
*
|
97
|
-
*
|
98
|
-
*
|
99
|
-
*
|
100
|
-
*
|
101
|
-
*
|
102
|
-
*
|
103
|
-
*
|
104
|
-
*
|
105
|
-
*
|
106
|
-
*
|
107
|
-
*
|
108
|
-
*
|
109
|
-
*
|
110
|
-
*
|
111
|
-
*
|
112
|
-
*
|
113
|
-
*
|
114
|
-
*
|
115
|
-
*
|
116
|
-
*
|
117
|
-
*
|
118
|
-
*
|
119
|
-
*
|
120
|
-
*
|
121
|
-
*
|
122
|
-
*
|
123
|
-
*
|
124
|
-
*
|
125
|
-
*
|
126
|
-
*
|
127
|
-
*
|
128
|
-
*
|
129
|
-
*
|
130
|
-
*
|
131
|
-
*
|
132
|
-
*
|
133
|
-
*
|
134
|
-
*
|
135
|
-
*
|
136
|
-
*
|
137
|
-
*
|
138
|
-
*
|
139
|
-
*
|
140
|
-
*
|
1
|
+
* Aaron Stone
|
2
|
+
* Adam Avilla
|
3
|
+
* Adam Esterline
|
4
|
+
* Alexander Sandström
|
5
|
+
* Alexandr Burov
|
6
|
+
* Andrew Katz
|
7
|
+
* Andrew Metcalf
|
8
|
+
* Andrew Sullivan Cant
|
9
|
+
* André Diego Piske
|
10
|
+
* Andy Delcambre
|
11
|
+
* Anshul Khandelwal
|
12
|
+
* Anton Chuchkalov
|
13
|
+
* Antonio Terceiro
|
14
|
+
* Ash Wilson
|
15
|
+
* Atul Bhosale
|
16
|
+
* Bart de Water
|
17
|
+
* Ben Burkert
|
18
|
+
* Benedikt Böhm
|
19
|
+
* Bill Mill
|
20
|
+
* Bo Jeanes
|
21
|
+
* Brandur
|
22
|
+
* Brian D. Burns
|
23
|
+
* Brian Hartsock
|
24
|
+
* Bryan Paxton
|
25
|
+
* Caio Chassot
|
26
|
+
* Caius Durling
|
27
|
+
* Carl Hörberg
|
28
|
+
* Carl Hörberg
|
29
|
+
* Carlos Sanchez
|
30
|
+
* Casper Thomsen
|
31
|
+
* Chris Hanks
|
32
|
+
* Christoph Rieß
|
33
|
+
* Christophe Taton
|
34
|
+
* Claudio Poli
|
35
|
+
* Craig Shannon
|
36
|
+
* Damien Mathieu
|
37
|
+
* Dan Hensgen
|
38
|
+
* Dan Peterson
|
39
|
+
* Dan Prince
|
40
|
+
* Dane Harrigan
|
41
|
+
* Daniel Berger
|
42
|
+
* Dave Myron
|
43
|
+
* Dave Newton
|
44
|
+
* Dave Vasilevsky
|
45
|
+
* David Biehl
|
46
|
+
* David Taylor
|
47
|
+
* Dimitrij Denissenko
|
48
|
+
* Dominik Richter
|
49
|
+
* Doug McInnes
|
50
|
+
* Esteban Pastorino
|
51
|
+
* Eugene Howe
|
52
|
+
* Evan Phoenix
|
53
|
+
* Fabian Wiesel
|
54
|
+
* Federico Ravasio
|
55
|
+
* Felix Wolfsteller
|
56
|
+
* Glenn Pratt
|
57
|
+
* Graeme Nelson
|
58
|
+
* Grey Baker
|
59
|
+
* Guillaume Balaine
|
60
|
+
* Hakan Ensari
|
61
|
+
* Hiroshi Hatake
|
62
|
+
* Ian Neubert
|
63
|
+
* Igor Fedoronchuk
|
64
|
+
* Jacob Atzen
|
65
|
+
* James Cox
|
66
|
+
* James Watling
|
67
|
+
* Jean Mertz
|
68
|
+
* Jeremy Hinegardner
|
69
|
+
* Jesse Kempf
|
70
|
+
* Jessica Jiang
|
71
|
+
* Joe Rafaniello
|
72
|
+
* John Keiser
|
73
|
+
* John Leach
|
74
|
+
* Jonas Pfenniger
|
75
|
+
* Jonathan Dance
|
76
|
+
* Jonathan Roes
|
77
|
+
* Joshua B. Smith
|
78
|
+
* Joshua Gross
|
79
|
+
* Joshua Mckinney
|
80
|
+
* Joshua Napoli
|
81
|
+
* Kelly Mahan
|
82
|
+
* Kensuke Nagae
|
83
|
+
* Kimmo Lehto
|
84
|
+
* Koen Rouwhorst
|
85
|
+
* Konstantin Shabanov
|
86
|
+
* Kyle Purkiss
|
87
|
+
* Kyle Rames
|
88
|
+
* Lewis Marshall
|
89
|
+
* Lincoln Stoll
|
90
|
+
* Louis Sobel
|
91
|
+
* Mahemoff
|
92
|
+
* Marco Costa
|
93
|
+
* Markus Bucher
|
94
|
+
* Mathias Meyer
|
95
|
+
* Matt Gauger
|
96
|
+
* Matt Palmer
|
97
|
+
* Matt Sanders
|
98
|
+
* Matt Snyder
|
99
|
+
* Matt Todd
|
100
|
+
* Maurice Schreiber
|
101
|
+
* Max Lincoln
|
102
|
+
* Michael Brodhead
|
103
|
+
* Michael Hale
|
104
|
+
* Michael Rowe
|
105
|
+
* Michael Rykov
|
106
|
+
* Mike Heffner
|
107
|
+
* Milovan Zogovic
|
108
|
+
* Myron Marston
|
109
|
+
* Nathan Long
|
110
|
+
* Nathan Sutton
|
111
|
+
* Nick Osborn
|
112
|
+
* Nicolas Leger
|
113
|
+
* Nicolas Sanguinetti
|
114
|
+
* Paul Gideon Dann
|
115
|
+
* Pavel
|
116
|
+
* Pavel Valena
|
117
|
+
* Peter Meier
|
118
|
+
* Peter Weldon
|
119
|
+
* Phil Ross
|
120
|
+
* Raul Murciano
|
121
|
+
* Richard Godbee
|
122
|
+
* Richard Ramsden
|
123
|
+
* Rohan Mendon
|
124
|
+
* Ruslan Korolev
|
125
|
+
* Ruslan Kyrychuk
|
126
|
+
* Ryan Bigg
|
127
|
+
* Ryan Mohr
|
128
|
+
* Ryan Schlesinger
|
129
|
+
* Ryoji Yoshioka
|
130
|
+
* Sam
|
131
|
+
* Sam Lehman
|
132
|
+
* Sam Withrow
|
133
|
+
* Scott Gonyea
|
134
|
+
* Scott Walkinshaw
|
135
|
+
* Sean Cribbs
|
136
|
+
* Sergio Rubio
|
137
|
+
* Shai Rosenfeld
|
138
|
+
* Stan Hu
|
139
|
+
* Stefan Merettig
|
140
|
+
* Stephen Chu
|
141
|
+
* Swanand Pagnis
|
142
|
+
* Terry Howe
|
143
|
+
* Thom Mahoney & Josh Lane
|
144
|
+
* Thom May
|
145
|
+
* Tim Carey-Smith
|
146
|
+
* Timothée Peignier
|
147
|
+
* Tobias Schmidt
|
148
|
+
* Todd Lunter
|
149
|
+
* Tom Maher
|
150
|
+
* Trym Skaar
|
151
|
+
* Tuomas Silen
|
152
|
+
* Victor Costan
|
153
|
+
* Viven
|
154
|
+
* Vít Ondruch
|
155
|
+
* Wesley Beary
|
156
|
+
* Yusuke Nakamura
|
157
|
+
* Zach Anker
|
158
|
+
* chrisrhoden
|
159
|
+
* dependabot[bot]
|
160
|
+
* dickeyxxx
|
161
|
+
* geemus
|
162
|
+
* geemus (Wesley Beary)
|
163
|
+
* ggoodale
|
164
|
+
* ivan.filenko
|
165
|
+
* jasquat
|
166
|
+
* karimb
|
167
|
+
* marios
|
168
|
+
* mkb
|
169
|
+
* nathannaveen
|
170
|
+
* ojab
|
171
|
+
* patrick brisbin
|
172
|
+
* pavel
|
173
|
+
* phiggins
|
174
|
+
* rin_ne
|
175
|
+
* rinrinne
|
176
|
+
* rkyrychuk
|
177
|
+
* shale
|
178
|
+
* sshaw
|
179
|
+
* starbelly
|
180
|
+
* twrodriguez
|
181
|
+
* wsnarski
|
182
|
+
* zimbatm
|
data/README.md
CHANGED
@@ -446,7 +446,16 @@ connection = Excon.new('https://example.com',
|
|
446
446
|
|
447
447
|
`client_key_pass` is optional.
|
448
448
|
|
449
|
-
|
449
|
+
Optionally, you can also pass the whole chain by passing the extra certificates through `client_chain`:
|
450
|
+
|
451
|
+
```ruby
|
452
|
+
connection = Excon.new('https://example.com',
|
453
|
+
client_cert: 'mycert.pem',
|
454
|
+
client_chain: 'mychain.pem',
|
455
|
+
client_key: 'mycert.key')
|
456
|
+
```
|
457
|
+
|
458
|
+
If you already have loaded the certificate, key and chain into memory, then pass it through like:
|
450
459
|
|
451
460
|
```ruby
|
452
461
|
client_cert_data = File.load 'mycert.pem'
|
@@ -454,6 +463,7 @@ client_key_data = File.load 'mycert.key'
|
|
454
463
|
|
455
464
|
connection = Excon.new('https://example.com',
|
456
465
|
client_cert_data: client_cert_data,
|
466
|
+
client_chain_data: client_chain_data,
|
457
467
|
client_key_data: client_key_data)
|
458
468
|
```
|
459
469
|
|
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 Jan 10 04:12:06 2023 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: 90c470e705b4b5f36f09684dc50e2b79c8b86989a848b62cd1a7bd6460ee65f6
|
18
18
|
##
|
19
19
|
|
20
20
|
|
@@ -489,29 +489,6 @@ IGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5ddBA6+C4OmF4O5MBKgxTMVBbkN
|
|
489
489
|
+8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IBZQ==
|
490
490
|
-----END CERTIFICATE-----
|
491
491
|
|
492
|
-
Network Solutions Certificate Authority
|
493
|
-
=======================================
|
494
|
-
-----BEGIN CERTIFICATE-----
|
495
|
-
MIID5jCCAs6gAwIBAgIQV8szb8JcFuZHFhfjkDFo4DANBgkqhkiG9w0BAQUFADBiMQswCQYDVQQG
|
496
|
-
EwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMuMTAwLgYDVQQDEydOZXR3b3Jr
|
497
|
-
IFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDYxMjAxMDAwMDAwWhcNMjkxMjMx
|
498
|
-
MjM1OTU5WjBiMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMu
|
499
|
-
MTAwLgYDVQQDEydOZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0G
|
500
|
-
CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkvH6SMG3G2I4rC7xGzuAnlt7e+foS0zwzc7MEL7xx
|
501
|
-
jOWftiJgPl9dzgn/ggwbmlFQGiaJ3dVhXRncEg8tCqJDXRfQNJIg6nPPOCwGJgl6cvf6UDL4wpPT
|
502
|
-
aaIjzkGxzOTVHzbRijr4jGPiFFlp7Q3Tf2vouAPlT2rlmGNpSAW+Lv8ztumXWWn4Zxmuk2GWRBXT
|
503
|
-
crA/vGp97Eh/jcOrqnErU2lBUzS1sLnFBgrEsEX1QV1uiUV7PTsmjHTC5dLRfbIR1PtYMiKagMnc
|
504
|
-
/Qzpf14Dl847ABSHJ3A4qY5usyd2mFHgBeMhqxrVhSI8KbWaFsWAqPS7azCPL0YCorEMIuDTAgMB
|
505
|
-
AAGjgZcwgZQwHQYDVR0OBBYEFCEwyfsA106Y2oeqKtCnLrFAMadMMA4GA1UdDwEB/wQEAwIBBjAP
|
506
|
-
BgNVHRMBAf8EBTADAQH/MFIGA1UdHwRLMEkwR6BFoEOGQWh0dHA6Ly9jcmwubmV0c29sc3NsLmNv
|
507
|
-
bS9OZXR3b3JrU29sdXRpb25zQ2VydGlmaWNhdGVBdXRob3JpdHkuY3JsMA0GCSqGSIb3DQEBBQUA
|
508
|
-
A4IBAQC7rkvnt1frf6ott3NHhWrB5KUd5Oc86fRZZXe1eltajSU24HqXLjjAV2CDmAaDn7l2em5Q
|
509
|
-
4LqILPxFzBiwmZVRDuwduIj/h1AcgsLj4DKAv6ALR8jDMe+ZZzKATxcheQxpXN5eNK4CtSbqUN9/
|
510
|
-
GGUsyfJj4akH/nxxH2szJGoeBfcFaMBqEssuXmHLrijTfsK0ZpEmXzwuJF/LWA/rKOyvEZbz3Htv
|
511
|
-
wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHNpGxlaKFJdlxD
|
512
|
-
ydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey
|
513
|
-
-----END CERTIFICATE-----
|
514
|
-
|
515
492
|
COMODO ECC Certification Authority
|
516
493
|
==================================
|
517
494
|
-----BEGIN CERTIFICATE-----
|
@@ -1654,36 +1631,6 @@ uglB4Zf4+/2a4n0Sye18ZNPLBSWLVtmg515dTguDnFt2KaAJJiFqYgIwcdK1j1zqO+F4CYWodZI7
|
|
1654
1631
|
yFz9SO8NdCKoCOJuxUnOxwy8p2Fp8fc74SrL+SvzZpA3
|
1655
1632
|
-----END CERTIFICATE-----
|
1656
1633
|
|
1657
|
-
Staat der Nederlanden EV Root CA
|
1658
|
-
================================
|
1659
|
-
-----BEGIN CERTIFICATE-----
|
1660
|
-
MIIFcDCCA1igAwIBAgIEAJiWjTANBgkqhkiG9w0BAQsFADBYMQswCQYDVQQGEwJOTDEeMBwGA1UE
|
1661
|
-
CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSkwJwYDVQQDDCBTdGFhdCBkZXIgTmVkZXJsYW5kZW4g
|
1662
|
-
RVYgUm9vdCBDQTAeFw0xMDEyMDgxMTE5MjlaFw0yMjEyMDgxMTEwMjhaMFgxCzAJBgNVBAYTAk5M
|
1663
|
-
MR4wHAYDVQQKDBVTdGFhdCBkZXIgTmVkZXJsYW5kZW4xKTAnBgNVBAMMIFN0YWF0IGRlciBOZWRl
|
1664
|
-
cmxhbmRlbiBFViBSb290IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA48d+ifkk
|
1665
|
-
SzrSM4M1LGns3Amk41GoJSt5uAg94JG6hIXGhaTK5skuU6TJJB79VWZxXSzFYGgEt9nCUiY4iKTW
|
1666
|
-
O0Cmws0/zZiTs1QUWJZV1VD+hq2kY39ch/aO5ieSZxeSAgMs3NZmdO3dZ//BYY1jTw+bbRcwJu+r
|
1667
|
-
0h8QoPnFfxZpgQNH7R5ojXKhTbImxrpsX23Wr9GxE46prfNeaXUmGD5BKyF/7otdBwadQ8QpCiv8
|
1668
|
-
Kj6GyzyDOvnJDdrFmeK8eEEzduG/L13lpJhQDBXd4Pqcfzho0LKmeqfRMb1+ilgnQ7O6M5HTp5gV
|
1669
|
-
XJrm0w912fxBmJc+qiXbj5IusHsMX/FjqTf5m3VpTCgmJdrV8hJwRVXj33NeN/UhbJCONVrJ0yPr
|
1670
|
-
08C+eKxCKFhmpUZtcALXEPlLVPxdhkqHz3/KRawRWrUgUY0viEeXOcDPusBCAUCZSCELa6fS/ZbV
|
1671
|
-
0b5G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gftL2fiFX1ye8FVdMpEbB4IMeDExNH08GGeL5qPQ6gqGy
|
1684
|
-
eUN51q1veieQA6TqJIc/2b3Z6fJfUEkc7uzXLg==
|
1685
|
-
-----END CERTIFICATE-----
|
1686
|
-
|
1687
1634
|
IdenTrust Commercial Root CA 1
|
1688
1635
|
==============================
|
1689
1636
|
-----BEGIN CERTIFICATE-----
|
@@ -2135,87 +2082,6 @@ F8Io2c9Si1vIY9RCPqAzekYu9wogRlR+ak8x8YF+QnQ4ZXMn7sZ8uI7XpTrXmKGcjBBV09tL7ECQ
|
|
2135
2082
|
aaApJUqlyyvdimYHFngVV3Eb7PVHhPOeMTd61X8kreS8/f3MboPoDKi3QWwH3b08hpcv0g==
|
2136
2083
|
-----END CERTIFICATE-----
|
2137
2084
|
|
2138
|
-
TrustCor RootCert CA-1
|
2139
|
-
======================
|
2140
|
-
-----BEGIN CERTIFICATE-----
|
2141
|
-
MIIEMDCCAxigAwIBAgIJANqb7HHzA7AZMA0GCSqGSIb3DQEBCwUAMIGkMQswCQYDVQQGEwJQQTEP
|
2142
|
-
MA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5hbWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3Ig
|
2143
|
-
U3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5UcnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3Jp
|
2144
|
-
dHkxHzAdBgNVBAMMFlRydXN0Q29yIFJvb3RDZXJ0IENBLTEwHhcNMTYwMjA0MTIzMjE2WhcNMjkx
|
2145
|
-
MjMxMTcyMzE2WjCBpDELMAkGA1UEBhMCUEExDzANBgNVBAgMBlBhbmFtYTEUMBIGA1UEBwwLUGFu
|
2146
|
-
YW1hIENpdHkxJDAiBgNVBAoMG1RydXN0Q29yIFN5c3RlbXMgUy4gZGUgUi5MLjEnMCUGA1UECwwe
|
2147
|
-
VHJ1c3RDb3IgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MR8w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LBk=
|
2160
|
-
-----END CERTIFICATE-----
|
2161
|
-
|
2162
|
-
TrustCor RootCert CA-2
|
2163
|
-
======================
|
2164
|
-
-----BEGIN CERTIFICATE-----
|
2165
|
-
MIIGLzCCBBegAwIBAgIIJaHfyjPLWQIwDQYJKoZIhvcNAQELBQAwgaQxCzAJBgNVBAYTAlBBMQ8w
|
2166
|
-
DQYDVQQIDAZQYW5hbWExFDASBgNVBAcMC1BhbmFtYSBDaXR5MSQwIgYDVQQKDBtUcnVzdENvciBT
|
2167
|
-
eXN0ZW1zIFMuIGRlIFIuTC4xJzAlBgNVBAsMHlRydXN0Q29yIENlcnRpZmljYXRlIEF1dGhvcml0
|
2168
|
-
eTEfMB0GA1UEAwwWVHJ1c3RDb3IgUm9vdENlcnQgQ0EtMjAeFw0xNjAyMDQxMjMyMjNaFw0zNDEy
|
2169
|
-
MzExNzI2MzlaMIGkMQswCQYDVQQGEwJQQTEPMA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5h
|
2170
|
-
bWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3IgU3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5U
|
2171
|
-
cnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxHzAdBgNVBAMMFlRydXN0Q29yIFJvb3RDZXJ0
|
2172
|
-
IENBLTIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCnIG7CKqJiJJWQdsg4foDSq8Gb
|
2173
|
-
ZQWU9MEKENUCrO2fk8eHyLAnK0IMPQo+QVqedd2NyuCb7GgypGmSaIwLgQ5WoD4a3SwlFIIvl9Nk
|
2174
|
-
RvRUqdw6VC0xK5mC8tkq1+9xALgxpL56JAfDQiDyitSSBBtlVkxs1Pu2YVpHI7TYabS3OtB0PAx1
|
2175
|
-
oYxOdqHp2yqlO/rOsP9+aij9JxzIsekp8VduZLTQwRVtDr4uDkbIXvRR/u8OYzo7cbrPb1nKDOOb
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|
2218
|
-
|
2219
2085
|
SSL.com Root Certification Authority RSA
|
2220
2086
|
========================================
|
2221
2087
|
-----BEGIN CERTIFICATE-----
|
data/excon.gemspec
CHANGED
@@ -26,7 +26,6 @@ Gem::Specification.new do |s|
|
|
26
26
|
s.add_development_dependency('eventmachine', '>= 1.0.4')
|
27
27
|
s.add_development_dependency('open4')
|
28
28
|
s.add_development_dependency('rake')
|
29
|
-
s.add_development_dependency('rdoc')
|
30
29
|
s.add_development_dependency('shindo')
|
31
30
|
s.add_development_dependency('sinatra')
|
32
31
|
s.add_development_dependency('sinatra-contrib')
|
data/lib/excon/connection.rb
CHANGED
@@ -62,6 +62,7 @@ module Excon
|
|
62
62
|
# @option params [Class] :instrumentor Responds to #instrument as in ActiveSupport::Notifications
|
63
63
|
# @option params [String] :instrumentor_name Name prefix for #instrument events. Defaults to 'excon'
|
64
64
|
def initialize(params = {})
|
65
|
+
@pid = Process.pid
|
65
66
|
@data = Excon.defaults.dup
|
66
67
|
# merge does not deep-dup, so make sure headers is not the original
|
67
68
|
@data[:headers] = @data[:headers].dup
|
@@ -89,7 +90,9 @@ module Excon
|
|
89
90
|
end
|
90
91
|
|
91
92
|
if @data[:scheme] == UNIX
|
92
|
-
|
93
|
+
# 'uri' >= v0.12.0 returns an empty string instead of nil for no host.
|
94
|
+
# So treat the parameter as present if and only if it is both non-nill and non-empty.
|
95
|
+
if @data[:host] && !@data[:host].empty?
|
93
96
|
raise ArgumentError, "The `:host` parameter should not be set for `unix://` connections.\n" +
|
94
97
|
"When supplying a `unix://` URI, it should start with `unix:/` or `unix:///`."
|
95
98
|
elsif !@data[:socket]
|
@@ -478,6 +481,11 @@ module Excon
|
|
478
481
|
@_excon_sockets ||= {}
|
479
482
|
@_excon_sockets.compare_by_identity
|
480
483
|
|
484
|
+
if @pid != Process.pid
|
485
|
+
@_excon_sockets.clear # GC will take care of closing sockets
|
486
|
+
@pid = Process.pid
|
487
|
+
end
|
488
|
+
|
481
489
|
if @data[:thread_safe_sockets]
|
482
490
|
# In a multi-threaded world, if the same connection is used by multiple
|
483
491
|
# threads at the same time to connect to the same destination, they may
|
@@ -577,6 +585,8 @@ module Excon
|
|
577
585
|
raise ArgumentError, "The `:ssl_proxy_headers` parameter should only be used with HTTPS requests."
|
578
586
|
end
|
579
587
|
if @data[:proxy][:scheme] == UNIX
|
588
|
+
# URI.parse might return empty string for security reasons.
|
589
|
+
@data[:proxy][:host] = nil if @data[:proxy][:host] == ""
|
580
590
|
if @data[:proxy][:host]
|
581
591
|
raise ArgumentError, "The `:host` parameter should not be set for `unix://` proxies.\n" +
|
582
592
|
"When supplying a `unix://` URI, it should start with `unix:/` or `unix:///`."
|
data/lib/excon/constants.rb
CHANGED
data/lib/excon/response.rb
CHANGED
@@ -20,15 +20,24 @@ module Excon
|
|
20
20
|
def host
|
21
21
|
@data[:host]
|
22
22
|
end
|
23
|
+
def scheme
|
24
|
+
@data[:scheme]
|
25
|
+
end
|
23
26
|
def local_address
|
24
27
|
@data[:local_address]
|
25
28
|
end
|
26
29
|
def local_port
|
27
30
|
@data[:local_port]
|
28
31
|
end
|
32
|
+
def http_method # can't be named "method"
|
33
|
+
@data[:method]
|
34
|
+
end
|
29
35
|
def path
|
30
36
|
@data[:path]
|
31
37
|
end
|
38
|
+
def query
|
39
|
+
@data[:query]
|
40
|
+
end
|
32
41
|
def port
|
33
42
|
@data[:port]
|
34
43
|
end
|
@@ -72,9 +81,13 @@ module Excon
|
|
72
81
|
:body => String.new,
|
73
82
|
:cookies => [],
|
74
83
|
:host => datum[:host],
|
84
|
+
:scheme => datum[:scheme],
|
85
|
+
:method => datum[:method],
|
75
86
|
:headers => Excon::Headers.new,
|
76
87
|
:path => datum[:path],
|
88
|
+
:query => datum[:query],
|
77
89
|
:port => datum[:port],
|
90
|
+
:omit_default_port => datum[:omit_default_port],
|
78
91
|
:status => status,
|
79
92
|
:status_line => line,
|
80
93
|
:reason_phrase => reason_phrase
|
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
|
+
result << block.slice!(0, idx+1)
|
76
|
+
add_to_read_buffer(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,27 @@ 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
197
|
if max_length
|
178
|
-
until @read_buffer.length >= max_length
|
198
|
+
until @backend_eof || @read_buffer.length >= max_length
|
179
199
|
@read_buffer << @socket.read_nonblock(max_length - @read_buffer.length)
|
180
200
|
end
|
181
201
|
else
|
182
|
-
|
202
|
+
while !@backend_eof
|
183
203
|
@read_buffer << @socket.read_nonblock(@data[:chunk_size])
|
184
204
|
end
|
185
205
|
end
|
186
206
|
rescue OpenSSL::SSL::SSLError => error
|
187
207
|
if error.message == 'read would block'
|
188
|
-
|
208
|
+
if @read_buffer.empty?
|
209
|
+
select_with_timeout(@socket, :read) && retry
|
210
|
+
end
|
189
211
|
else
|
190
212
|
raise(error)
|
191
213
|
end
|
@@ -195,10 +217,10 @@ module Excon
|
|
195
217
|
select_with_timeout(@socket, :read) && retry
|
196
218
|
end
|
197
219
|
rescue EOFError
|
198
|
-
@
|
220
|
+
@backend_eof = true
|
199
221
|
end
|
200
222
|
|
201
|
-
if max_length
|
223
|
+
ret = if max_length
|
202
224
|
if @read_buffer.empty?
|
203
225
|
nil # EOF met at beginning
|
204
226
|
else
|
@@ -208,6 +230,8 @@ module Excon
|
|
208
230
|
# read until EOFError, so return everything
|
209
231
|
@read_buffer.slice!(0, @read_buffer.length)
|
210
232
|
end
|
233
|
+
@eof = @backend_eof && @read_buffer.empty?
|
234
|
+
ret
|
211
235
|
end
|
212
236
|
|
213
237
|
def read_block(max_length)
|
@@ -219,9 +243,7 @@ module Excon
|
|
219
243
|
raise(error)
|
220
244
|
end
|
221
245
|
rescue *READ_RETRY_EXCEPTION_CLASSES
|
222
|
-
|
223
|
-
select_with_timeout(@socket, :read) && retry
|
224
|
-
end
|
246
|
+
select_with_timeout(@socket, :read) && retry
|
225
247
|
rescue EOFError
|
226
248
|
@eof = true
|
227
249
|
end
|
data/lib/excon/ssl_socket.rb
CHANGED
@@ -90,6 +90,14 @@ module Excon
|
|
90
90
|
else
|
91
91
|
ssl_context.key = OpenSSL::PKey::RSA.new(client_key_data, client_key_pass)
|
92
92
|
end
|
93
|
+
if client_chain_data && OpenSSL::X509::Certificate.respond_to?(:load)
|
94
|
+
ssl_context.extra_chain_cert = OpenSSL::X509::Certificate.load(client_chain_data)
|
95
|
+
elsif client_chain_data
|
96
|
+
certs = client_chain_data.scan(/-----BEGIN CERTIFICATE-----(?:.|\n)+?-----END CERTIFICATE-----/)
|
97
|
+
ssl_context.extra_chain_cert = certs.map do |cert|
|
98
|
+
OpenSSL::X509::Certificate.new(cert)
|
99
|
+
end
|
100
|
+
end
|
93
101
|
elsif @data.key?(:certificate) && @data.key?(:private_key)
|
94
102
|
ssl_context.cert = OpenSSL::X509::Certificate.new(@data[:certificate])
|
95
103
|
if OpenSSL::PKey.respond_to? :read
|
@@ -171,6 +179,14 @@ module Excon
|
|
171
179
|
end
|
172
180
|
end
|
173
181
|
|
182
|
+
def client_chain_data
|
183
|
+
@client_chain_data ||= if (ccd = @data[:client_chain_data])
|
184
|
+
ccd
|
185
|
+
elsif (path = @data[:client_chain])
|
186
|
+
File.read path
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
174
190
|
def connect
|
175
191
|
# backwards compatability for things lacking nonblock
|
176
192
|
@nonblock = HAVE_NONBLOCK && @nonblock
|
data/lib/excon/version.rb
CHANGED
data/lib/excon.rb
CHANGED
@@ -198,8 +198,13 @@ module Excon
|
|
198
198
|
headers_match = !stub.has_key?(:headers) || stub[:headers].keys.all? do |key|
|
199
199
|
case value = stub[:headers][key]
|
200
200
|
when Regexp
|
201
|
-
|
202
|
-
|
201
|
+
case request_params[:headers][key]
|
202
|
+
when String
|
203
|
+
if (match = value.match(request_params[:headers][key]))
|
204
|
+
captures[:headers][key] = match.captures
|
205
|
+
end
|
206
|
+
when Regexp # for unstub on regex params
|
207
|
+
match = (value == request_params[:headers][key])
|
203
208
|
end
|
204
209
|
match
|
205
210
|
else
|
@@ -209,8 +214,13 @@ module Excon
|
|
209
214
|
non_headers_match = (stub.keys - [:headers]).all? do |key|
|
210
215
|
case value = stub[key]
|
211
216
|
when Regexp
|
212
|
-
|
213
|
-
|
217
|
+
case request_params[key]
|
218
|
+
when String
|
219
|
+
if (match = value.match(request_params[key]))
|
220
|
+
captures[key] = match.captures
|
221
|
+
end
|
222
|
+
when Regexp # for unstub on regex params
|
223
|
+
match = (value == request_params[key])
|
214
224
|
end
|
215
225
|
match
|
216
226
|
else
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: excon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.99.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dpiddy (Dan Peterson)
|
8
8
|
- geemus (Wesley Beary)
|
9
9
|
- nextmat (Matt Sanders)
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2023-02-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|
@@ -96,20 +96,6 @@ dependencies:
|
|
96
96
|
- - ">="
|
97
97
|
- !ruby/object:Gem::Version
|
98
98
|
version: '0'
|
99
|
-
- !ruby/object:Gem::Dependency
|
100
|
-
name: rdoc
|
101
|
-
requirement: !ruby/object:Gem::Requirement
|
102
|
-
requirements:
|
103
|
-
- - ">="
|
104
|
-
- !ruby/object:Gem::Version
|
105
|
-
version: '0'
|
106
|
-
type: :development
|
107
|
-
prerelease: false
|
108
|
-
version_requirements: !ruby/object:Gem::Requirement
|
109
|
-
requirements:
|
110
|
-
- - ">="
|
111
|
-
- !ruby/object:Gem::Version
|
112
|
-
version: '0'
|
113
99
|
- !ruby/object:Gem::Dependency
|
114
100
|
name: shindo
|
115
101
|
requirement: !ruby/object:Gem::Requirement
|
@@ -249,7 +235,7 @@ metadata:
|
|
249
235
|
documentation_uri: https://github.com/excon/excon/blob/master/README.md
|
250
236
|
source_code_uri: https://github.com/excon/excon
|
251
237
|
wiki_uri: https://github.com/excon/excon/wiki
|
252
|
-
post_install_message:
|
238
|
+
post_install_message:
|
253
239
|
rdoc_options:
|
254
240
|
- "--charset=UTF-8"
|
255
241
|
require_paths:
|
@@ -265,8 +251,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
265
251
|
- !ruby/object:Gem::Version
|
266
252
|
version: '0'
|
267
253
|
requirements: []
|
268
|
-
rubygems_version: 3.
|
269
|
-
signing_key:
|
254
|
+
rubygems_version: 3.4.1
|
255
|
+
signing_key:
|
270
256
|
specification_version: 4
|
271
257
|
summary: speed, persistence, http(s)
|
272
258
|
test_files: []
|