logtail-rack 0.1.2 → 0.1.3

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: 1586d9af9309d5e2195cb64715fec586f80990faad899b745bf4451ae033d206
4
- data.tar.gz: 6971194227e47830e74da08039a6878b8b92b3fbcc879c085b41a6caa053dad7
3
+ metadata.gz: c4b9576a2e94a8591830fff3268b33d6f503b7530b25808e7f67f0ed417af623
4
+ data.tar.gz: '08b698d12becef45820e18fba233ba6d97e36f27cc77627c634626624d84f852'
5
5
  SHA512:
6
- metadata.gz: 921675d8114b08db6429503b412e914d21e0f50358d921628e296ccc4fb01b43d4b2d256aa6194a545ff9940922ad42e64470435b66235cdc8fd1030fa6718f8
7
- data.tar.gz: e1a28533af67cc52e3b2803abeb3c8c2ed3db970f8e02354adc1678cf6ce1d879d24c90b4c85a338f685a548aae64c457bdc3cfebf12145db8924a8e656d9eb5
6
+ metadata.gz: f817365f9c82b5c76b5d4ad9aecc15c7f4b54d0f863363527e712e78d3ba923295bff2f40cd557818687065eb360f65a2c349d6d1fb8b352a283c65881a2287c
7
+ data.tar.gz: 8031a60fbbf6627bbc065119e75ad34f875bd921fb606669f5240a4c8381628e1e684d2bedce1b0c8aa70926ee905663d419788eb50797d169b830d7e2bed082
@@ -182,13 +182,13 @@ module Logtail
182
182
  body: event_body,
183
183
  content_length: request.content_length,
184
184
  headers: request.headers,
185
- host: request.host,
185
+ host: force_encoding(request.host),
186
186
  method: request.request_method,
187
187
  path: request.path,
188
188
  port: request.port,
189
- query_string: request.query_string,
189
+ query_string: force_encoding(request.query_string),
190
190
  request_id: request.request_id,
191
- scheme: request.scheme,
191
+ scheme: force_encoding(request.scheme),
192
192
  body_limit: self.class.http_body_limit,
193
193
  headers_to_sanitize: self.class.http_header_filters,
194
194
  )
@@ -271,6 +271,14 @@ module Logtail
271
271
  false
272
272
  end
273
273
  end
274
+
275
+ def force_encoding(value)
276
+ if value.respond_to?(:force_encoding)
277
+ value.dup.force_encoding('UTF-8')
278
+ else
279
+ value
280
+ end
281
+ end
274
282
  end
275
283
  end
276
284
  end
@@ -1,7 +1,7 @@
1
1
  module Logtail
2
2
  module Integrations
3
3
  module Rack
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logtail-rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Logtail
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-04-20 00:00:00.000000000 Z
11
+ date: 2021-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logtail
@@ -86,7 +86,7 @@ dependencies:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
88
  version: '3.0'
89
- description:
89
+ description:
90
90
  email:
91
91
  - hi@logtail.com
92
92
  executables: []
@@ -120,7 +120,7 @@ metadata:
120
120
  homepage_uri: https://github.com/logtail/logtail-ruby-rack
121
121
  source_code_uri: https://github.com/logtail/logtail-ruby-rack
122
122
  changelog_uri: https://github.com/logtail/logtail-ruby-rack/blob/master/README.md
123
- post_install_message:
123
+ post_install_message:
124
124
  rdoc_options: []
125
125
  require_paths:
126
126
  - lib
@@ -135,8 +135,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  - !ruby/object:Gem::Version
136
136
  version: '0'
137
137
  requirements: []
138
- rubygems_version: 3.2.3
139
- signing_key:
138
+ rubygems_version: 3.1.2
139
+ signing_key:
140
140
  specification_version: 4
141
141
  summary: Logtail integration for Rack
142
142
  test_files: []