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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 48e8f7e0dc2f9c76295426b0d18a44853797d1aa3e9a776ed319853cd5eca0af
4
- data.tar.gz: edd058019e6602d95412a3f00c8fa48ce4147cab70cee51223f25ce575fe61c6
3
+ metadata.gz: 73f0c5559061955f9b4c280dede2c9058dafc945c9135da19fdc95a39472e6a2
4
+ data.tar.gz: 9e309d5c459846f1e8d44411e24aa6dbdb7b214cc88241af433258ce95e1e7ea
5
5
  SHA512:
6
- metadata.gz: 50a73b6d2af85c8807c7fe41008c7ae3c260d0883c5bea0024c81d7bbb839563a1392a56f6967e784678d5c2491e33631bded930916d320792160d47db3432c1
7
- data.tar.gz: 1300a13faebba70414cced00ba99bee90a686487b1b4f950800e60eb10b0a11b6f9f969a3591e718a5b164a79011fdb39c97ddf56d2923152614448f7b243d65
6
+ metadata.gz: a0e848be9fbec89daa97f5b20fb951a8725152739c9bdae7207f6bfc8576ae5e983ba2c310382f7bf0a143d6a2409cd8f6d868f109e0ea68ad43b860979b9683
7
+ data.tar.gz: 82597ec57a2f30c69c53ff4a54d55fc30fb7511b49ecd0da5b54d0896682f6ad4789bdf380fbb41c80b21a9351515c16265c56c141ce55e9fa2711f957303719
@@ -3,8 +3,8 @@ inherit_from:
3
3
 
4
4
  Lint/HandleExceptions:
5
5
  Exclude:
6
- - test/rails_integration_test.rb
7
- - test/sinatra_integration_test.rb
6
+ - test/**/*.rb
7
+ - spec/**/*.rb
8
8
  Lint/RescueException:
9
9
  Exclude:
10
10
  - lib/kiev/request_body_filter/json.rb
@@ -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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kiev
4
- VERSION = "4.1.0"
4
+ VERSION = "4.2.0"
5
5
  end
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.1.0
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: 2019-12-05 00:00:00.000000000 Z
11
+ date: 2020-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack