faraday-net_http 2.0.1 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +0 -1
- data/lib/faraday/adapter/net_http.rb +7 -1
- data/lib/faraday/net_http/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e471698764d66a8adfeafe9e3bad0472da1548fd4607ad5558b67cfce4932b02
|
4
|
+
data.tar.gz: 8cac9b619ce0ed8fbc861e5f4dfc46339dd61b066ec685bd6bda5deaa0c13456
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afd126506d6c8c2110cd71a561ae0923ae32946ec437ad2cc5acc04ee1b50c2a2a7ac4cb1cf0752b0f9afae4f1227fa7d0e5e7693dd1c478a5c9f03be5923d45
|
7
|
+
data.tar.gz: e9cbb0a9571ca1eefb2b30cbc02b45939272447dd976ff36f079b0f09d8adc2faaef0e0e918c552359e51ca85c69e1881616af516eaf30be96228b99b91ea2de
|
data/README.md
CHANGED
@@ -15,6 +15,7 @@ module Faraday
|
|
15
15
|
exceptions = [
|
16
16
|
IOError,
|
17
17
|
Errno::EADDRNOTAVAIL,
|
18
|
+
Errno::EALREADY,
|
18
19
|
Errno::ECONNABORTED,
|
19
20
|
Errno::ECONNREFUSED,
|
20
21
|
Errno::ECONNRESET,
|
@@ -166,6 +167,7 @@ module Faraday
|
|
166
167
|
http.ssl_version = ssl[:version] if ssl[:version]
|
167
168
|
http.min_version = ssl[:min_version] if ssl[:min_version]
|
168
169
|
http.max_version = ssl[:max_version] if ssl[:max_version]
|
170
|
+
http.verify_hostname = ssl[:verify_hostname] if verify_hostname_enabled?(http, ssl)
|
169
171
|
end
|
170
172
|
|
171
173
|
def configure_request(http, req)
|
@@ -210,7 +212,7 @@ module Faraday
|
|
210
212
|
def encoded_body(http_response)
|
211
213
|
body = http_response.body || +''
|
212
214
|
/\bcharset=\s*(.+?)\s*(;|$)/.match(http_response['Content-Type']) do |match|
|
213
|
-
content_charset = Encoding.find(match.captures.first)
|
215
|
+
content_charset = ::Encoding.find(match.captures.first)
|
214
216
|
body = body.dup if body.frozen?
|
215
217
|
body.force_encoding(content_charset)
|
216
218
|
rescue ArgumentError
|
@@ -218,6 +220,10 @@ module Faraday
|
|
218
220
|
end
|
219
221
|
body
|
220
222
|
end
|
223
|
+
|
224
|
+
def verify_hostname_enabled?(http, ssl)
|
225
|
+
http.respond_to?(:verify_hostname=) && ssl.key?(:verify_hostname)
|
226
|
+
end
|
221
227
|
end
|
222
228
|
end
|
223
229
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faraday-net_http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan van der Pas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -42,7 +42,7 @@ licenses:
|
|
42
42
|
metadata:
|
43
43
|
homepage_uri: https://github.com/lostisland/faraday-net_http
|
44
44
|
source_code_uri: https://github.com/lostisland/faraday-net_http
|
45
|
-
changelog_uri: https://github.com/lostisland/faraday-net_http/releases/tag/v2.0
|
45
|
+
changelog_uri: https://github.com/lostisland/faraday-net_http/releases/tag/v2.1.0
|
46
46
|
post_install_message:
|
47
47
|
rdoc_options: []
|
48
48
|
require_paths:
|