kudzu 1.1.7 → 1.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kudzu/agent/fetcher.rb +7 -1
- data/lib/kudzu/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: c800ecf84774efe264d7ab653c2c138aa9b2110e04c96f33b917b5b5e86d211b
|
4
|
+
data.tar.gz: 6b8c36b2b012308b7cfa2a7b50029c8261e15ed983dd2c61e16ea85095a040dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0998ed3c26fa729e4fc473c4ed98acbaa6862e23d1a7b0feb341322f7fcd50cb38b8fa9759c54e38909214fb6f349da21a11742e24324b53d5dcfd92a9f0f239'
|
7
|
+
data.tar.gz: 7bf7bd66e00c3cf63d83716517bac1d33ca975827a6eb610e9eaac034464339f1738c3a92b07ce69bbf541dc999bcb814675e1c2510bdbaa5e09f83aa2460ba8
|
data/lib/kudzu/agent/fetcher.rb
CHANGED
@@ -83,12 +83,18 @@ module Kudzu
|
|
83
83
|
Response.new(url: url,
|
84
84
|
status: response.code.to_i,
|
85
85
|
body: fetched ? response.body.to_s : nil,
|
86
|
-
response_header: Hash[response.each.to_a],
|
86
|
+
response_header: force_header_encoding(Hash[response.each.to_a]),
|
87
87
|
response_time: response_time,
|
88
88
|
redirect_from: redirect_from,
|
89
89
|
fetched: fetched)
|
90
90
|
end
|
91
91
|
|
92
|
+
def force_header_encoding(response_header)
|
93
|
+
response_header.each do |key, value|
|
94
|
+
response_header[key] = value.force_encoding('utf-8').encode('utf-8', invalid: :replace, undef: :replace)
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
92
98
|
def redirection?(code)
|
93
99
|
code = code.to_i
|
94
100
|
300 <= code && code <= 399
|
data/lib/kudzu/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kudzu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yoshikazu Kaneta
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08-
|
11
|
+
date: 2018-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|