lib/timber/util/http_event.rb in timber-2.0.14 vs lib/timber/util/http_event.rb in timber-2.0.15

- old
+ new

@@ -26,10 +26,10 @@ if headers.is_a?(::Hash) h = headers.each_with_object({}) do |(k, v), h| # 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) + h[k] = v && Timber::Util::String.normalize_to_utf8(v) end keys_to_sanitize = [AUTHORIZATION_HEADER] + (Config.instance.header_filters || []) Util::Hash.sanitize(h, keys_to_sanitize) else \ No newline at end of file