Merge pull request #1206 from atambo/master

No need to force_encoding to utf8 twice
This commit is contained in:
Jordan Sissel 2014-03-25 17:31:28 -07:00
commit 12fcec92e0

View file

@ -86,7 +86,7 @@ class LogStash::Filters::UserAgent < LogStash::Filters::Base
# UserAgentParser outputs as US-ASCII. # UserAgentParser outputs as US-ASCII.
target[@prefix + "name"] = ua_data.name.force_encoding(Encoding::UTF_8).force_encoding(Encoding::UTF_8) target[@prefix + "name"] = ua_data.name.force_encoding(Encoding::UTF_8)
#OSX, Andriod and maybe iOS parse correctly, ua-agent parsing for Windows does not provide this level of detail #OSX, Andriod and maybe iOS parse correctly, ua-agent parsing for Windows does not provide this level of detail
unless ua_data.os.nil? unless ua_data.os.nil?