File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -182,13 +182,13 @@ def call(env)
182182 body : event_body ,
183183 content_length : request . content_length ,
184184 headers : request . headers ,
185- host : request . host ,
185+ host : force_encoding ( request . host ) ,
186186 method : request . request_method ,
187187 path : request . path ,
188188 port : request . port ,
189- query_string : request . query_string ,
189+ query_string : force_encoding ( request . query_string ) ,
190190 request_id : request . request_id ,
191- scheme : request . scheme ,
191+ scheme : force_encoding ( request . scheme ) ,
192192 body_limit : self . class . http_body_limit ,
193193 headers_to_sanitize : self . class . http_header_filters ,
194194 )
@@ -271,6 +271,14 @@ def silenced?(env, request)
271271 false
272272 end
273273 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
274282 end
275283 end
276284 end
Original file line number Diff line number Diff line change 11module Logtail
22 module Integrations
33 module Rack
4- VERSION = "0.1.2 "
4+ VERSION = "0.1.3 "
55 end
66 end
77end
You can’t perform that action at this time.
0 commit comments