lib/timber/util/http_event.rb in timber-2.0.7 vs lib/timber/util/http_event.rb in timber-2.0.8

- old
+ new

@@ -32,10 +32,13 @@ h[k] = SANITIZED_VALUE else if Config.instance.header_filters && Config.instance.header_filters.include?(k) h[k] = SANITIZED_VALUE else - h[k] = v + # Force the header into a valid UTF-8 string, otherwise we will encounter + # encoding issues when we convert this data to json. Moreoever, if the + # data is already valid UTF-8 we don't pay a penalty. + h[k] = Timber::Util::String.normalize_to_utf8(v) end end end else headers \ No newline at end of file