kiev 4.1.0 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -2
- data/lib/kiev/rack/request_logger.rb +11 -1
- data/lib/kiev/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: 73f0c5559061955f9b4c280dede2c9058dafc945c9135da19fdc95a39472e6a2
|
4
|
+
data.tar.gz: 9e309d5c459846f1e8d44411e24aa6dbdb7b214cc88241af433258ce95e1e7ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0e848be9fbec89daa97f5b20fb951a8725152739c9bdae7207f6bfc8576ae5e983ba2c310382f7bf0a143d6a2409cd8f6d868f109e0ea68ad43b860979b9683
|
7
|
+
data.tar.gz: 82597ec57a2f30c69c53ff4a54d55fc30fb7511b49ecd0da5b54d0896682f6ad4789bdf380fbb41c80b21a9351515c16265c56c141ce55e9fa2711f957303719
|
data/.rubocop.yml
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "zlib"
|
4
|
+
|
3
5
|
module Kiev
|
4
6
|
module Rack
|
5
7
|
class RequestLogger
|
@@ -115,6 +117,15 @@ module Kiev
|
|
115
117
|
full_body << str
|
116
118
|
end
|
117
119
|
data[:body] = full_body.join
|
120
|
+
if data[:body] && !data[:body].empty? && response.headers["Content-Encoding"] == "gzip"
|
121
|
+
begin
|
122
|
+
sio = StringIO.new(data[:body])
|
123
|
+
gz = Zlib::GzipReader.new(sio)
|
124
|
+
data[:body] = gz.read
|
125
|
+
rescue Zlib::GzipFile::Error => err
|
126
|
+
data[:gzip_parse_error] = err.message
|
127
|
+
end
|
128
|
+
end
|
118
129
|
end
|
119
130
|
|
120
131
|
should_log_errors = config.log_request_error_condition.call(request, response)
|
@@ -123,7 +134,6 @@ module Kiev
|
|
123
134
|
data[:error_message] = exception.message[0..5000]
|
124
135
|
data[:error_backtrace] = Array(exception.backtrace).join(NEW_LINE)[0..5000]
|
125
136
|
end
|
126
|
-
|
127
137
|
data
|
128
138
|
end
|
129
139
|
|
data/lib/kiev/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kiev
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Blacklane
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|